HTML TEXT
Introduction HTML whitespace handling
Whitespace Whitespace refers the spaces, tabs, and carriage returns are all whitespace characters Whitespace is normalized in HTML5 Carriage return characters are rendered as a single space
Whitespace (Example) Whitespace is normalized when an THML document is rendered: The following will be rendered the same: <p>foo</p> <p> foo </p>
Whitespace (Example) The following text <p>This text will appear on one line </p> Will be rendered as (whitespace is normalized): This text will appear on one line
Textual Elements (1) The <p> element marks a paragraph It’s a block-level element The semantic <small> element marks “disclaimers, caveats, legal restrictions, or copyright It’s an inline element The inline <strong> denotes important text <em> denotes emphasis
Textual Elements (2) Use the <cite> element to create a citation or reference to a source Use <blockquote> for a standalone quote and <q> for short quotes within a sentence Enclose images in the <figure> tag
Textual Elements (3) The inline <abbr> attribute marks an abbreviation Use the title attribute for the actual title Use the <dfn> element to define a key term The <sub> element marks inline text as subscript The <super> element marks inline text as superscript The <del> element marks inline text as strike through (deleted) text
Textual Elements (4) The <ins> marks text as inserted text The <code> element marks text as programmatic code The <pre> element marks preformatted text Whitespace is preserved <mark> highlights text <br /> creates a line break <span> works like <div> except it marks an inline element(s) rather than a block element. Use the <address> element to mark contact information for a person or company
The <time> element Markup a point in time or a duration using the <time> element The datetime attribute contains the date
Entity References We often need to Insert special meta-characters < > into HTML documents Named entities Insert symbols © Numbered entities
Inserting Special Characters (Named Entities) a complete list appears at http://w3schools.com/tags/ref_entities.asp non-breaking space ¢ cent symbol £ British Pound © copyright symbol ® registered trademark < less than > greater than & ampersand " double-quotation mark
Inserting Unicode Symbols It’s possible to specify a UNICODE code point as a decimal or hexadecimal number (where d is a decimal or hexadecimal value ) Examples: &#dddd; (decimal) (hex)
Finding Symbols PowerPoint’s Insert Symbol dialog box is a good tool
Named Entities (Example) The following <br> is rendered as