Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
114 changes: 114 additions & 0 deletions david-madden.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
This is my homework file. There are many like it, but this one is mine.

This is my codepen link:
https://codepen.io/davidmadden/pen/ExXPoNW

Here are my answers:
1. What is Semantic HTML?
Semantic HTML is HTML that is readily readable by humans - you can look at a tag and know exactly what that thing is.
2. What is HTML used for?
HTML is used as the structure of a webpage.
3. What is an attribute and where do we put it?
An attribute modifies or adds additional info to a tag (ie with an id or a class name)
4. What is the h1 tag used for? How many times should I use it on a page?
h1 is reserved for the most important title on the page. Use it once.
5. Name two tags that have required attributes
<a> and <img>
6. What do we put in the head of our HTML document?
Primarily metadata and a title.
7. What is an id?
A way to identify a single element on a page.
8. What elements can I add an id to?
many elements, including h1-7 and paragraphs
9. How many times can I use the same id on a page?
once. that's why brit said use classes for styling by default
10. What is a class?
A way of selecting specific elements for styling
11. What elements can I add a class to?
sections, links, text, etc
12. How many times can I use the same class on a page?
how many times do you WANT to use it?
13. How do I get my link to open in a new tab?
use a tgt="_blank" attribute in the anchor tag
14. What is the alt attribute in the image tag used for?
for vision-impaired visitors
15. How do I reference an id?
In CSS you reference an HTML id with "#"
16. What is the difference between a section and a div
Sections are semantic. Divs are for styling.
17. What is CSS used for?
To make your janky website less janky
18. How to we select an element? Example - every h2 on the page
h2{put your css in here}
19. What is the difference between a class and an id? - Give me an example of when I might use each one
You can use a class multiple times vs. once for an id. Classes are good for CSS, id is more useful for referencing an element in javascript
20. How do we select classes in CSS?
.class-name-here {}
21. How do we select a p element with a single class of “human””?
.human p {}
22. What is a parent child selector? When would this be useful?
A way of selecting (in CSS) specific elements with specific parents. Could be helpful in formatting every link inside a div block (or whatever you need based on context)
23. How do you select all links within a div with the class of sidebar?
.sidebar > a {}
24. What is a pseudo selector?
:hover and :active are examples. they apply themselves in a specific state.
25. What do we use the change the spacing between lines?
line-height: in css
26. What do we use to change the spacing between letters?
letter-spacing: in css
27. What do we use to to change everything to CAPITALS? lowercase? Capitalize?
text-transform:uppercase; text-transform:lowercase; text-transform:capitalize;
28. How do I add a 1px border around my div that is dotted and black?
div {
border: 1px dotted black;
}
29. How do I select everything on the page?
body{}
30. How do I write a comment in CSS?
/* comment */
31. How do I find out what file I am in, when I am using the command line?
pwd (print working directory)
32. Using the command line - how do I see a list of files/folders in my current folder?
ls -a (a shows hidden files)
33. How do I remove a file via the command line? Why do I have to be careful with this?
rm filename - gotta be careful because it's FOREVER
34. Why should I use version control?
so you can go back and see old work without crazy filenames. also, it helps collaboration on large codebases.
35. How often should I commit to github?
commit early, commit often
36. What is the command we would use to push our repo up to github?
git push -u origin david-madden
37. Walk me through Lambda's git flow.
- fork on Github (upper right)
- copy clone SSH link
- terminal: be where you want the clone
- `git clone git@github.com:DaveMadden/Git-Flow-Practice.git`
- enter SSH passphrase
- `cd` into new repo
- `git checkout -b david-madden`
- `code .` to open current repo in VS Code from terminal
- DO WORK. Save it.
- `git status` *optional but good practice: shows red text
- `git add .` adds repo changes, makes them ready to commit
- `git status` *optional but good practice: shows green text
- `git commit -m "comment content"`
- `git push -u origin david-madden`
- enter SSH key
- go to repo on GitHub
- select `david-madden` instead of `master` from the dropdown menu top left
- create pull request
- change `base repository` to mine
- submit pull request
- copy URL and submit


Stretch Questions

1. What is the difference between an inline element and a block element?
Blocks take the full width and start a new line (like a div) whereas inline elements do not (eg a span)
2. What happens when an element is positioned absolutely?
Other elements can end up positioned overlapping them because absolute positioning means nothing moves and the flow disregards them
3. How do I make an element take up only the amount of space it needs but also have the ability to give it a width?
put it in a div and add padding
4. Name 3 elements that are diplay block by default, 2 elements that are display inline by default and 1 element that is display inline-block by default
5. In your own words, explain the box model. What is the "fix" for the box model, in other words, how do we make all elements respect the width we've given them?