Beginning HTML, XHTML, CSS and JavaScript - Code Examples

Back to main book index

Chapter 1: Creating Structured Documents

Here are the examples for Chapter 1, which introduces you to the main XHTML elements that add structure to your pages and text.

ch01_eg01.htmlYour first web page
ch01_eg02.htmlUsing attributes (to add a link)
ch01_eg03.htmlHow white space is collapsed
ch01_eg04.htmlCreating headings using the hn elements
ch01_eg05.htmlStructuring headings and paragraphs
ch01_eg06.htmlThe align attribute
ch01_eg07.htmlCreating paragraphs using the <p> element
ch01_eg08.htmlCreating line breaks using the <br> element
ch01_eg09.htmlCreating preformatted text using the <pre> element
Try it outBasic Text Formatting - Starting the Example Cafe

Presentation Elements

ch01_eg10.htmlUsing the <b> <i> <u> <s> and <tt> elements
ch01_eg11.htmlUsing the <sup> <sub> <big> <small> and <hr /> elements

Phrase Elements

ch01_eg12.htmlAdding emphasis with the <em> and <strong> elements
ch01_eg13.htmlAddresses using the <address> element
ch01_eg14.htmlAbbreviations, acronyms and definitions using the <abbr> <acronym> and <dfn> elements
ch01_eg15.htmlQuotations and citations using the <blockquote> <quote> and <cite> elements
ch01_eg16.htmlCode using the <code> <kbd> <var> and <samp> elements

Lists

ch01_eg17.htmlUnordered lists using the <ul> and <li> elements
ch01_eg18.htmlOrdered lists using the <ol> and <li> elements
ch01_eg19.htmlDefinition lists using the <dl> <dd> and <dd> elements
ch01_eg20.htmlNesting lists
Try it outText formatting - Example Cafe Recipes page

Editing text

ch01_eg21.htmlEditing text with the <ins> and <del> elements

Block and inline elements

ch01_eg22.htmlBlock level and inline elements