There are a variety of element tags that are used specifically to mark-up text:
- MDN HTML Elements Reference
<h1>,<p>,<b>,<i>, etc
There are also a variety of semantic tags that can be used to provide additional information for accessability and those reading your code, such as emphasis, acronyms/abbreviations, addresses, citations, quotes, and more.
- see the link above to the MDN HTML Elements Reference to get a full list of semantic elements
CSS allows you to create rules that affect how the website is styled/presented to the user. By referencing specific element types, id's, classes, or combinations of all three you can specifically target HTML elements to precicely control how it looks.
- CSS can be applied to HTML element in-line, in page in the
<head>, or linked via afilename.cssexternal file
<link href="filename.css" type="text/css" rel="stylesheet" />
type="text/css"not required
selector {
target property: value;
}
.selector { = class
#selector { = id
h1, h2, h3 { = multiple at once
header, h1 { = h1 of a specific section, in this case the header
- JavaScript is case sensitive, camelCase is the
- Statements: individual instruction step to a computer ends in
; - Comments: notes about what your code is doing
// - Variable: delcared via
let,const, orvar, holds a valuevaris outdated not preferredlet variable = value;- must start with a letter,
_, or$ - can't use keywords
- Data Types: string, number, boolean
- Arrays: stores multiple values separated by commas
let array = [value1, value2, value 3];- index starts at position 0
- methods can be applied to arrays
- Expressions: evaluate into a value
- Operators: used with expressions to calculate a value
Decisions have two components:
- An expression which is evaluated and returns a value
- A conditional statement that tells it what to do
Evaluating Operators
==equal to, '43' == 43===strict equals '43' != 43!=not equals to!==strict not equals to<less than>greater than<=less than or equal to>=greater than or equal to
Logical Operators
&&AND||OR!NOT
If and if else statements
if (condition){
code to be executed;
}
if (condition1){
code to execute if condition 1 is true;
} else {
code to excute if condition 1 is false;
}