code fellows 201
When you make a web page, use mark-up tags to emphasize sertaint content within the text. Structural Markup is used to describe headings and pharagraphs. Semantic Markuo is used to provide extra emphasisin a sentance.
HTML has 6 levels of headings. The
tag is ised for main headings.
is used for subheadings. The rest are used to further divide sections of your web page as you see fit.
Paragraphs
Pharagraphs are identified with the
tag. New paragraphs automatically start on a new line with some spacing inbetween it and the last paragraph.
Bold elements are found in the tag. Italics are inserted with the tag. The Strong element tag is it indicates a strong importance in text. the tag creates emphasis in a sentance that subtly changes its meaning.
The element creates superscript. The element creates a subscript.
Programmers use extra spaces and page breaks to make the code easy to read. HTML ignores the extra spaces and counts them as one space, also known as White Space Collapsing.
Use the
tag to add a line break in the middle of a paragraph.
the
tag inserts a horizontal rule in the page.
Blockquotes- the
tag is used to highlight quotes longer than a pharagraph. They are also usually indented. Quotes- the tag is used for smaller quotes that sit within a pharagraph. Citations- use tag to indicate where a citation is from.CSS works by changing the way elements within certaint tags look in HTML. For more information on designing with CSS see previous notes: Reading-Notes-102: Design web pages with CSS
A Script is a set of instructions that the programm follows to complete a task. Each individual action or step is know as a statement.
Comments in code are writen by developers to explain what the code does. You can add a comment by using the "//" in the beginning of a line before you start typing. Multyple line comments are contained within: / Comments go here /
A variable is where information in code is stored. Variables have 6 rules for naming them:
- The name needs to start with a letter, dollar sign, or underscore. No numbers!
- The rest can contain the characters allowed in the first rule in any order, but can include numbers now. No dashes or periods.
- No keyword or reserved words
- Variables are case sensitive
- Use a name that describes the information
- For multi word variables: no spaces, first word lowercase, second word uppercase
There are 3 data types:
- Numeric Data - numbers
- String Data - text
- Boolean Data - true or false
An Array stores a list of variables. Items listed within an array start with the number 0, not 1.
a == b 'loose equality' 10 == '10' Value must be the same but type can be different
a === b 'strict eqaulity' both the type and the value have to be the same 10 === 10
a != b 'inequality' 10 != '10' (this is false)
a !== b 'strict inquality' 10 !== '10' (this is true)
a > b 'greater than'
a < b 'less than'
a >= b 'greater than or equal to'
a <= b 'less than or equal to'
a && b "and"
a || b "or"
!a "not a" - bang/ opposite day
See previous notes about this topic here: Reading-Notes-102: Operators and Loops