Prework Study Guide
✨ Open the Console to See What's Happening ✨
HTML
- The head element contains information about the webpage.
- The title element defines the title for a webpage. This element is required and is extremely important for Search Engine Optimization (SEO).
- The style element defines the CSS styles associated with a website.
- The base element defines the base URL for a webpage.
- The link element connects an external resource to the HTML document.
- The meta element defines metadata such as the character set, description, keywords, author, and viewport.
- The body element represents the visible content shown to the user.
- HTML is used to build a sturdy frame as HTML elements are our buuilding blocks.
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.
- We need to link a CSS file to an HTML file using a link element with a rel attribute and an href attribute.
Git
- git status: checks what branch we are currently on
- git checkout -b branch-name: creates a new branch and switches to it
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 JavaScript, to declare a variable, we use the var keyword. After the var keyword, we give the variable a name. This name must be unique because it is how we will reference the information stored in the variable in our code.
- The strict equality operator (===) checks to see if two values are equal, and returns a Boolean result true if the values are equal and false if the values are not equal.
- A function is different from a for loop or conditional statement because functions do not automatically execute when the JavaScript file (in our case, script.js) is run. Instead, you must call a function by name in order to execute it.