Prework Study Guide
✨ Open the Console to See What's Happening ✨
HTML
- The head element contains information about the webpage.
- The different kinds of elements contained in the head element are:
- meta tag used to provide information like the character set, viewport
- link tag used to link different files like stylesheets required for the webpage
- title tag used for giving a title to the webpage describing its contents
- The body element represents the visible content shown to the user.
CSS
- A margin indicates how much space we want outside of an element.
- A padding indicates how much space we want around the content inside an element.
- A period before the class name is used to indicate it is a class selector.
- External stylesheets are linked to the HTML using the 'link' tag in the head element.
Git
- git status: Checks which branch we are currently on.
- git checkout -b branch-name: creates a new branch and switches to it.
- git add -A: stages all the changes.
- git commit -m "message": commits the staged changes. It is advisable to add different commits to each change.
- git pull origin main: to check if local branch is in sync with the main branch.
- git push origin branch-name: pushes all the commited changes to the feature branch into the GitHub repo.
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.
- Conditional logic (like for loops and if statements) are used to alter the flow of code execution depending on certain conditions.
- Functions are a set of instructions that tells the computer how to perform a certain task.
- Functions are useful when some parts of code need to be reused.
- To execute the set of instructions inside a function it has to be called with the corresponding function name.