Prework Study Guide
✨ Open the Console to See What's Happening ✨
HTML
- The head element contains information about the webpage.
- The body element represents the visibile content shown to the user.
- Elements are the parts of the HTML document which help the web browser understand how to display the contents.
- Tags and elements are slightly different, but often used interchangably, even if this is technically incorrect.
- Header tags are listed as h1, h2, h3 etc. and h1 is the largest size while h6 is the smallest.
- The src attribute is important because it defines the location of the image.
CSS
- CSS is mostly concerned with the aesthetic and layout of a website.
- 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.
- There are three main ways to style using CSS, inline CSS, internal CSS style sheet, and external CSS style sheet.
- External CSS style sheet is most commonly used as it allows for more flexibility with making changes because it uses an external separate file.
- When working with External CSS style sheets you must link it to the HTML file by using the link element.
- Do Not Repeat Yourself Code (or DRY) is encouraged as it allows the code to be more easily fixed and read between different developers.
- margin relates to the amount of space that goes on the outside of an element.
- padding relates to the amount of space that goes around the content that is inside an element.
Git
- git status: checks what branch we are currently on
- git checkout -b branch-name: creates a new branch and switches to it
- Git commands always start with git
- Using a git pull is a good way to ensure you have the latest version of your code.
- git push origin allows you to create a new branch or add changes to a branch.
- It is very important to make sure you are working in the correct branch, which is usually not the main branch.
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.
- Order is important in JavaScript because tasks are executed from top to bottom.
- A function defines a block of code that performs a certain task.
- Functions do not execute on their own, you must call the function in code in order to get it to execute.
- JavaScript is an Object Oriented Programming Language.
- Items in an array have a unique number assigned to them, which always starts from 0.
- An array can store a variety of different types of data, such as strings, numbers and Boolean values.
- A function differs from a for loop as it does not execute automatically, while a for loop does.