Reading 02
June 16, 2020
Chapter 2: Text
- Tags AKA ‘markup’
- Structural markup are the elements used for headings and paragraphs
- Semantic markup provides extran info about quotes, italics, etc.
- Covers the H1-H6 tags, the p tag, b and i tags, sup and sub script tags.
- White space collapsing is used to make code easier to read, its a formatting technique for coders.
- line break is br. horizontal line is hr. br and hr are empty tags, self closing.
- strong is bold, em is italics.
- blockquote is a block quote, q is an inline quote.
- abbr replaces acronym tag in h5. cite is a work you are citing in text.
- dfn is when you are defining a term for the first time.
- address is a container for an address. Kind of like article.
- ins and del are insert and delete. s is strikethrough.
Chapter 10: Introducing CSS
- CSS controls the style of the page. HTML controls the structure.
- The key to understanding how CSS works is to imagine there is a container around every element.
- CSS includes a selector such as p or ul or whatever, a declaration, such as font family and arial. Declarations include a property and a value. so, selector \ declaration, which is a property and a value.
*external CSS begins in the HTML doc with the link tag. Internal CSS begins with the style tag.
- CSS selectors are the scope of how ot apply the CSS rule. can be at the universal level, type level, class selector, id selector, and so on. Helpful chart on p. 238.
- CSS rules cascade.
js Chapter 2: Javascript Instructions
- each step in a block of instructions is a statement.
- each statement ends with a semi-colon
- make comments to explain what the code does.
- js is case-sensitive.
- scripts need to locate bits of info to do their job. those bits are stored in variables.
- to let the computer know what data it needs to store, we declare variables using var
- vars start with the var keyword, and then the name of the variable. If the variable is going to have two words, we push them together and capitalize the second word. just like carKeys. This is known as writing it in camelCase.
- declare the variable first, then assign a value to the variable.
- data types include numbers, strings, boolean true false.
- declare variables first. then assign values to the variables. Sample at top of p. 63 is useful.
js Chapter 4: Decisions and Loops
- Decisions and loops control the flow of data.
- Conditions and conditional statements usually use comparison operators like less than equal and so forth to return a true false value on the condition.
- Conditional statements use if then logic and an else statement to do something different. Only it never uses the word then.
- Comparison operators are just like mat except the != which is not equal to and === which is strict equal to.
- comparison operators have parens and include a comparison. so score >= pass, with parens.
- Combining expressions with comparison operators looks like an algebra problem. See p 155 for example.
-
| logical operators return true false values. Those opeartors are &&, |
|
, !. or and, or, not, respectively. |
- If statements evaluate a condition. If the condition returns as tru, any subsequent statements run.
- If else expands on that. The condition needs to be met. If it isn’t met, the else happens.