By Jacob Farnes For CIT-230 Winter 2016
Declares document type Normal Depreciated Legacy
Declared in a meta tag Refers to how your document is saved Must be a valid IANA character set namevalid IANA character set name Typically UTF-8 or US-ASCII
Contents Text content Void content Tags Tag name Start tag End tag Void tags have start tags but do not have end tags
Have no content themselves Can have Attributes Complete List of Void elements area base br col command embed hr img input keygen link meta param source track wbr
Nested Tags must be ended within their containing tag Do NOT: Lorem Ipsum Dolor DO: Lorem ipsum dolor
Attributes are expressed inside an element start tag. Attributes have a name and a value Attributes cannot use ‘ or “ or in the name and values Double BAD
Text in elements and comments must be valid Unicode characters Cannot be undefined Unicode Cannot be U+0000 characters Cannot contain control characters Character data Normal text Replaceable in title and text area tags Non-Replaceable in script and style tags
Named & would become "&" † would become "†" Decimal & becomes “&” † becomes "†" Hexadecimal † becomes "†" See : sp
No, I don’t mean from your users Comment text cannot hold tags or have inside it cannot have -- or -> cannot end with “–” Should describe your code well enough that if you died tomorrow, your no-nothing successor could figure out what it was meant to do. (Hit-by-the-bus principle)