home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam    

Book HomeHTML & XHTML: The Definitive GuideSearch this book

1.5. HTML and XHTML: What They Aren't

With all their multimedia-enabling, new page layout features, and the hot technologies that give life to HTML/XHTML documents over the Internet, it is also important to understand the languages' limitations. They are not word-processing tools, desktop publishing solutions, or even programming languages. That's because their fundamental purpose is to define the structure and appearance of documents and document families so that they may be delivered quickly and easily to a user over a network for rendering on a variety of display devices. Jack of all trades, but master of none, so to speak.

1.5.1. Content Versus Appearance

Before you can fully appreciate the power of the language and begin creating effective documents, you must yield to one fundamental rule. These markup languages are designed to structure documents and make their content more accessible, not to format documents for display purposes.

HTML and its progeny XHTML do provide many different ways to let you define the appearance of your documents: font specifications, line breaks, and multicolumn text are all features of the language. And, of course, appearance is important, since it can have either detrimental or beneficial effects on how users access and use the information in your documents.

But with HTML and XHTML, content is paramount; appearance is secondary, particularly since it is less predictable, given the variety of browser graphics and text-formatting capabilities. Besides, these markup languages contain many more ways for structuring your document content without regard to the final appearance: section headers, structured lists, paragraphs, rules, titles, and embedded images are all defined by the standard languages without regard for how these elements might be rendered by a browser. Consider, for example, a browser for the blind, wherein graphics on the page come with audio descriptions and alternative rules for navigation. The HTML 4 standard defines such a thing: content over visual presentation.

If you treat HTML or XHTML as a document-generation tool, you will be sorely disappointed in your ability to format your document in a specific way. There is simply not enough capability built into the languages to allow you to create the kind of documents you might whip up with tools like FrameMaker or Microsoft Word. Attempts to subvert the supplied structuring elements to achieve specific formatting tricks seldom work across all browsers. In short, don't waste your time trying to force HTML and XHTML to do things they were never designed to do.

Instead, use HTML and XHTML in the manner for which they were designed: indicating the structure of a document so that the browser can then render its content appropriately. HTML and XHTML are rife with tags that let you indicate the semantics of your document content, something that is missing from tools like Frame or Word. Create your documents using these tags and you'll be happier, your documents will look better, and your readers will benefit immensely.

Library Navigation Links

Copyright © 2002 O'Reilly & Associates. All rights reserved.