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 visible content shown to the user.
- The img elements contains information about any images that are displayed on a webpage.
- The br element creates a break or an empty space between two blocks of content.
CSS
- "style" element attributes to the color of a single heading.
- "link" element is used when you have an external CSS style sheet.
- There are three ways to style a webpage using CSS: Inline, Internal, and External CSS sheet style.
- Declarations contain two important components: the CSS property we want to apply and the value of the property.
- A margin indicates how much space we want around the outside of an element.
- A padding property adds space around th econtent inside an element.
- To apply a rule to all the elements on a page, you use a wild symbol. Such as *.
- Practice the DRY (do not repeat) code by combining selectors with commas.
- The text.align element is used as a positioning property as a way to center a title.
Git
- git Status: Check what branch we are currently working on.
- git checkout -b branch name: creates a new branch and switches to it.
- git revert: used to go back to the desired code to fix any bugs or make changes.
- git add -A: to command git to stage all the files. Files are staged after making changes.
- git commit -m "description": Helps keep track of what was done in the commit.
- git pull origin main: lets you know if the branch is up to date.
- git push origin "name for branch": pushes changes done in local environment to the main branch.
JavaScript
- The "script" element links the JavaScript file to the HTML file, just like the "link" element in CSS.
- A variable (var) is a container that store values. You start by using the "let" element followed by "myVariable".
- Variables are case sensitive. You can also creat and add a name to the variable in the same line.
- Comments are just snipets of text that don't trigger a responser from the browser. Use wild symbols, such as *, the block in text that will only by for human readers.
- Strict equality (===) runs tests to see if two values are equal. (I.e. letmyVariable =3; myVariable=4;) The results come back in the form of a ture/false statement.
- A function is a way of packing functionality that you wish to reuse.
- Use the console.log method to output a message to the web console by adding an argument. Console refers to a test environment and log() refers to a set of instructions that can be exectuted by the computer.