HTML The Definitive Guide (8 page)

Read HTML The Definitive Guide Online

Authors: Chuck Musciano Bill Kennedy

BOOK: HTML The Definitive Guide
7.43Mb size Format: txt, pdf, ePub

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.

1.4.2 Specific Limitations of HTML

There are limits to the kinds of formatting and document structuring HTML can provide, and no current browser implements all of the ones the new HTML standard prescribes. Specifically, various browser manufacturers had implemented several HTML features before the standard emerged in late

1997. These include:
Framed document layout


Scripted dynamic documents


Moving and layered text


Absolute text and image positioning


Those niceties that just aren't available in any standard version of HTML are: Footnotes, endnotes, automatic tables of contents and indexes ●

Headers and footers


Tabs and other automatic character spacing ●

Nested numbered lists


Mathematical typesetting


1.4.3 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.

1.3 HTML: What It Is

1.5 Nonstandard Extensions

Chapter 1

HTML and the World Wide

Web

 

1.5 Nonstandard Extensions

You don't have to write in HTML for long before you realize its limitations. That's why Netscape Navigator (the browser portion of Netscape Communicator) quickly became the most popular browser less than a year after it was released. While others were content to implement HTML standards, the developers at Netscape were hard at work extending the language and their browser to capture the potentially lucrative and certainly exciting commercial markets on the Web.

With a market presence like that, Netscape led not only the market, but the standards drive as well.

Those browser features that Netscape provided and that weren't part of HTML quickly become de facto standards because so many people use them. That's a nightmare for HTML authors. A lot of people want you to use the latest and greatest gimmick or even useful HTML extension. But it's not part of the standard, and not all browsers support it. In fact, on occasion, the popular browsers supported different ways of doing the same thing in HTML.

1.5.1 Extensions: Pro and Con

Every software vendor adheres to the technological standards; it's embarrassing to be incompatible and your competitors will take every opportunity to remind buyers of your product's failure to comply, no matter how arcane or useless that standard might be. At the same time, vendors seek to make their products different and better than the competition's offerings. Netscape's and Internet Explorer's extensions to standard HTML are perfect examples of these market pressures at work.

Many HTML document authors feel safe using these extended browsers' nonstandard extensions, because of their combined and commanding share of users. For better or worse, extensions to HTML

made by the folks at Netscape or Microsoft instantly become part of the street version of HTML, much like English slang creeping into the vocabulary of most Frenchmen despite the best efforts of the Académie Française.

Fortunately, with HTML version 4.0, the W3C standards have caught up with the browser manufacturers. In fact, the tables have turned somewhat. The many extensions to HTML that originally appeared as extensions in Netscape Navigator and Internet Explorer are now part of the HTML 4.0 standard, and there are other parts of the new standard that are not yet features of the popular browsers.

Other books

Human Croquet by Kate Atkinson
The Deadline by Ron Franscell
Hot Pursuit by Gemma Fox
The Last Rain by Edeet Ravel
Dandelion Dreams by Samantha Garman
Cody's Varsity Rush by Todd Hafer
Lifted Up by Angels by Lurlene McDaniel
The Great Northern Express by Howard Frank Mosher
Male Me by Amarinda Jones