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 declaration !DOCTYPE html is not case sensitive
- The section metadata is not visible to the end user
- Used to add structure to a webpage
- div creates a division in the page
- span creates an inline division on a page
- Closing tags begin with a forward slash
- h1-h6 define heading level
- p defines a paragraph or block of text
- img contains info about images and the src attribute within defines the location of the image file
- br creates a line break between two content blocks
- section elements help organize content
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.
- CSS = cascading style sheets
- style=___ changes the color of a single heading or for full body if put in the head section
- add a link rel = ____ , href = _____ to head in html to link the style sheet
- text-align:, font-size: self explanatory
- Can be done inside HTML code or as a separate styling sheet file
- card class….learn more later?
- box-shadow adds px of shadow effects around a frame
- colors define by semantic references or hex #
Git
- git status: checks what branch we are currently on
- git checkout -b branch-name: creates a new branch and switches to it
- git clone will clone a remote repo to your local directory
- Git flow: git add -A, git commit -m “comment”, git pull origin main, git push origin “feature/branch”, pull request, merge
JavaScript
- var used to declare a variable
- console.log used to output a message to the web console by adding an argument
- add script link in the footer of the HTML code
- Control flow is the order in which a computer executes code in a script.
- if statement used to instruct application based on true or false values, else if used to add more conditions
- Arrays [ ] used to evaluate multiple data values at a time and can hold multiple types of data at once
- for loop executes a task on data over and over again in a loop, must add condition to define variable start value and number of loops to be executed, as well as define the iteration
- use if statements and for loops when calling a function