HTML
- The head element contains information about the webpage.
- The body element represents the visible content shown to the user.
- It is best to use semantics where possible, as this makes the HTML easier to read.
- It is still common to see non-semantic elements such as 'div'.
- Use headings in order of h1 - h6, with h1 only be used once per page.
- Including alt text for images will help for screen readers, other assistive technologies, and improve search ranking results.
CSS
- CSS is used to define style rules for specific elements of a HTML page.
- Inline CSS is useful for quick and permanent changes, but is less flexible then external and internal style sheets.
- Internal style sheets contain rules for the webpage in the head section of the HTML file.
- External CSS sheets are preferred in most cases as it allows developers to keep all of their CSS rules in a seperate file, making design changes easier.
Git
- git status - Displays active branch
- git add -A - Adds all current modified files ready for committing
- git commit -m 'commit message'" - Commits locally with message for changes
- git pull origin 'main' - Pulls latest changes from origin
- git push origin 'branch' - Pushes commit live to the specified branch
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.
- In JavaScript you can store different data types in a single array e.g. var studentInfo = ["Lu", 54, True];
- If JavaScript loads first and is supposed to affect following HTML code, it will need to be placed at the bottom just above the closing body to accomodate this.