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 meta data, which contain information about the page that is used by the
browser
- Metadata can be used to help with webiste's SEO and help it rank better on search engines like Google, and
Bing
- The body element represents the visible content shown to the user.
- Elements that are nested inside other elements are called child elements
- The element that holds all the children is a parent element
- E.g. "Li" is a child element of "ul" and the parent element of "ul" is "section".
CSS
- A margin indicates how much space we want around the outside of an element.
- A padding indicates how much space we want around the content inside an element.
- You can stylise your code in 3 different ways:
- Inline - by using the style attribute inside HTML elements
- Internal - by using a "style" element in the "head" section
- External - by using a "link" element to link to an external CSS file
- To add your own style class you can define it to your style.css file ".MyClassName"
Git
- git status: checks what branch we are currently on
- git checkout -b branch-name: creates a new branch and switches to it
- git checkout main: switches to the main branch
- git pull origin main: pulls the most up-to-date version of your Github repository to your local machine
- git commit -m "description of commit": uploads committed changes to the branch on Github
Javascript
- 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.
- In the if statement you use "===" to check if a variable is true or false
- Functions hold instructions that can be reused throughout a file