Section 02
Validation, XHTML Markup, and Tables
Web pages, like the best of us, need love, too. As authors, we need to craft our XHTML with care, massaging head and body with finesse, primping and beautifying our markup, and most of all, validating it, lest it behave awkwardly, often temperamentally, once exposed to the world. Think of XHTML validation as an author’s public display of affection.
Thus we spend a good portion of section 2 going over how to validate XHTML documents, and why this validation is so important. We discuss the Document Type Definition and what it means to authors and browsers. We crown our XHTML document with it, and send the whole page off to the W3C validator. We analyze any errors, do what we can to clean things up, then rinse and repeat until we’re certain our XHTML shines with perfection.
Once we understand how to validate XHTML, we go into the fundamentals of building a web document, reviewing the most popular of XHTML elements, such as the ubiquitous <p> tag, the conspicuous heading tags, the orderly <ol> tag, and its unorderly sibling, the <ul> tag. Finally, we spend a great deal of time addressing one of the most important structures in XHTML, the table, and how to appropriately construct them.
An underpinning theme of the section, emphasized while we validate documents and construct tables, is accessibility. Often an after-thought, accessibility allows people and devices, especially the browser on which we depend on as our interpreters, to better understand the dialect within our web pages. Without accessibility, web pages may unintentionally hide pertinent information from a large population of the community, or perhaps display the information incorrectly.