STUDY
GUIDE
HTML
- The <head> element contains information about the webpage.
- The <body> element represents the visible content shown to the user.
- Use h1, h2... h6 for headings.
- For accessibility, you should only use the <h1> once, to make clear which one is the heading.
- The <ul> is used for an unordered list (bullet-points).
- The <ol> is used for an ordered list (with numbers).
- The <li> is used to list items.
- The <img> is used for images.
- For accessibility, you should add a description into the alt attribute,
and a link to your image file into the src attribute.
CSS
- A margin indicates how much space we want around the outside of an element.
- A padding is a kind of margin around the content but being part of its own background inside the border.
- Before the : you add the property, and after it, the value.
- Remember to close with a ; after the value.
- If you want to include more than one selector, just use comma's.
- The properties names are pretty obvious; like for font size, just type font-size.
Git
- Use git before each Git statement in the terminal.
- Use checkout to move to a different branch.
- Use -b to create a a new branch next to git checkout.
- Use pull to update your local branch.
- Use origin to indicate the source of the pull or push.
- When using main, you're refering to the main branch.
- Use push for making changes to a branch.
- After commiting, and deleting a branch, don't forget going back to main.
- Remember to always check the branch you're at with git status statement.
JavaScript
- A JS statement is "falsy" if 0, -0, On, "", null, undefined, NaN or false.
- To add an "else if", you need to close the first "if" statement and follow it with the "else if".
- JavaScript follows the statements in order.
- For extra conditions, use "else if", but if you just need a value for a falsy statement, use "else".
- To hold text in a JS constant or variable, you use "" or '', and it's called a string.
- When making a loop, use "for" and then list the conditions of the "var" separated by a ";".
- A variable is a named container that allows us to store data in our code.
- Control flow is the order in which a computer executes code in a script.
- Order of factors in JS matter! Always define a "var" before using it in other "var" or "function".