Prework Study Guide
✨ Open the Console to See What's Happening ✨
HTML
- The head element contains information about the webpage.
- The head element is a container for metadata which contain info about the page used by the browser.
- Headers (h1, h2, h3, etc.) are typically used in order with h1 being used only once.
- The body element represents the visible content shown to the user.
- Use a href to link another website
CSS
- If there is a separate CSS file, it must be linked in the HTML file.
- Margin = outside of an element; Padding = around the content, inside an element.
- link element creates connnection to external file
- rel="documenttype" specifies relationship between current and linked docs.
- href="documentlocation" specifies relative path;
- * { } is a universal selector in css file.
Git
- git status: checks what branch we are currently on
- git checkout -b branch-name: creates a new branch and switches to it
- git pull origin main: pulls from Github to make sure main branch is updated on local repository
- git add -A: commit all changes in the current branch
- git commit -m "example message": commit to repository (-m is for a message)
- git push origin branch-name: push all changes to Github repository
- to push an existing project to GitHub, use
git remote add origin git@github.com:"username"/"repositoryname" after adding and commiting in terminal
Javascript
- Control flow dictates Javascript files are executed from top to bottom; order matters.
- A variable is a named container that must be declared allowing us to store data.
- Variables can have different parameters and different types of data stored within the same one.
- JavaScript files must also be linked to the index file similar to CSS.
- for loop, if, else if statements, === returns boolean