start page | rating of books | rating of authors | reviews | copyrights

HTML: The Definitive Guide

Previous Chapter 1
HTML and the World Wide Web
Next
 

1.4 HTML: What It Isn't

With all its multimedia-enabling, new page layout features, and the hot technologies that give life to HTML documents over the Internet, it is also important to understand the language's limitations: HTML is not a word processing tool, a desktop publishing solution, or even a programming language, for that matter. That's because its fundamental purpose is to define the structure and appearance of documents and document families so that they might 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.

Content Versus Appearance

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

HTML does provide many different ways to let you define the appearance of your documents: font specifications, line breaks, and preformatted 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 HTML documents.

But with HTML, content is paramount; appearance is secondary, particularly since it is less predictable given the variety of browser graphics and text-formatting capabilities. Besides, HTML contains 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 HTML without regard for how these elements might be rendered by a browser.

If you treat HTML 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 HTML 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 to do things it was never designed to do.

Instead, use HTML in the manner for which it was designed: indicating the structure of a document so that the browser can then render its content appropriately. HTML is 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.

Specific Limitations of HTML

There are limits to the kinds of formatting and document structuring HTML can provide. Extensions to the language remove some of the restrictions imposed by HTML 3.2; other limitations linger.

Specifically, the features that do not exist in the HTML 3.2 standard, but are made possible by extensions implemented by the various browser manufacturers and are generally considered part of HTML 3.2, include:

Those niceties that just aren't available in any standard version of HTML are:

Yielding to the Browser

Many novice HTML authors try to get around these limitations by taking careful note of how their browser displays the contents of certain tags and then misusing those tags to achieve formatting tricks. For example, some authors nest certain kinds of lists several levels deep, not because they are actually creating deeply nested lists, but because they want their text specially indented.

There are many different browsers running on many different computers and they all do things differently. Even two different users using the same browser version on their machines can reconfigure the software so that the same HTML document will look completely different. What looks fabulous on your personal browser can and often does look terrible on other browsers.

Yield to the browser. Let it format your document in whatever way it deems best. Recognize that the browser's job is to present your documents to the user in a consistent, usable way. Your job, in turn, is to use HTML effectively to mark up your documents so that the browser can do its job effectively. Spend less time trying to achieve format-oriented goals. Instead, focus your efforts on creating the actual document content and adding the HTML tags to structure that content effectively.


Previous Home Next
HTML: What It Is Book Index Nonstandard Extensions

HTML: The Definitive Guide CGI Programming JavaScript: The Definitive Guide Programming Perl WebMaster in a Nutshell