HTML
- The head element contains information about the webpage.
- The body element represents the visible content shown to the user.
- HTML = Hyper Text Markup Language
- Elements such as head, body, section, h1, can have attributes that further define the element.
- pre tag tells browser to display whitespace. useful when displaying code.
- code tag semantically labels as code, but will still interpret it. Use below to edit the triangle brackets so it doesnt.
- < less than & lt ;
- > greater than & gt ;
- & ampersand & amp ;
- Potatoes
CSS
- blurry text-shadow
text-shadow: #fc0 1px 0 10px; color | offset-x | offset-y | blur-radius
- rainbow background
background: linear-gradient(45deg, red, orange, yellow, green, blue, indigo, violet, red);
- rainbow border
border: 5px solid transparent; border-image: linear-gradient(to bottom right, #b827fc 0%, #2c90fc 25%, #b8fd33 50%, #fec837 75%, #fd1892 100%); border-image-slice: 1;
- to make element fit within container
max-width: 100%;
- to alternate background of table rows
tr:nth-child(even){ background-color: lightblue; }
Git
Notes
- REMEMBER to delete the local branch when it has been merged (when the pull request has been accepted)
Quick Reference
Command | Action |
---|---|
git clone [url] | download a repository that already exists on github, including all of the files, branches, and commits. |
git status | checks what branch, and what changes there are, and what is staged for commit |
git checkout -b branch-name | creates a new branch and switches to it |
git checkout branch-name | switches to branch-name |
git branch | returns list of all branches open locally. *asterisked branch is the one that's checked out (the active one) |
git branch -d branch-name | deletes branch-name |
git fetch | downloads all history from the remote tracking branches |
git merge | Combines remote tracking branches into current local branch |
git add file-name | adds file-name to the staging area ready for commit. git add -A adds all changed files to next commit. |
git push | uploads all local branch commits to GitHub |
git pull | updates current local working branch with all new commits from the corresponding remote branch on GitHub. A combination of "git fetch" and "git merge" |
git diff first-branch second-branch | shows differences between the two specified branches. |
git config --list | list all chosen configurations |
JavaScript
- link to script at bottom of html, just before close of body tag. e.g.
</footer> <script src="./assets/script.js"></script> </body>
- 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.
- Need to declare a variable or function before you refer to it.
- console.log('displays result in the console in browser dev tools')