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 body element represents the visible content shown to the user.
- The 'h1' is the opening tag and '/h1' is the closing tag. The content in between those tags
- The 'p' element represents a paragraph or block of text. You'll use this element extensively to wrap most of the text on your webpages
- The 'ul', 'ol', and 'li' elements represent unordered lists, ordered lists, and list items. In essence, these HTML elements represent bulleted or numbered lists. In our example, the 'ul' element contains an unordered, or bullet, list of the reasons why we like pandas
- The 'img' element contains information about images that are displayed on the webpage. The 'img' element can contain various attributes; the src attribute is the most important because it defines the location of the image
- The 'br' element creates a line of empty space, or a line break, between two blocks of content. There is a 'br' element in between the image and the hyperlink below it
- the 'a' element (which stands for anchor) creates links to the same webpage or other webpages. The href attribute points to the URL for the link
- The `src` attribute defines the location, or source, of the image file.
- The `alt` attribute contains a text string that describes the appearance and functionality of the image.
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.
Git
- git status: checks what branch we are currently on
- git checkout -b branch-name: creates a new branch and switches to it
- to save work on GitHub:
1. make sure you are on the right branch from the command line ("git status")
2. type "git add -A" (add -A commits all files to the working branch)
3. type "git commit -m" "what was changed" (the -m flag associates a message wioth our commits)
4. type "git pull origin main" (you should see "Already up to date")
5. type "git push origin "branch""
6. Navigate to repository on GitHub
7. Click "Pull Requests" and select "New pull request"
8. Give PR a title and short description of the changes made
9. Create the pull request and merge the pull request
10. Open command in GitBash and update local repository
11. Type "git checkout main"
12. Type "git pull origin main"
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.