HTML The Definitive Guide (9 page)

Read HTML The Definitive Guide Online

Authors: Chuck Musciano Bill Kennedy

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

1.5.2 Avoiding Extensions

In general, we urge you to resist using an HTML extension unless you have a compelling and overriding reason to do so. By using them, particularly in key portions of your documents, you run the risk of losing a substantial portion of your potential readership. Sure, the Netscape community is large enough to make this point moot now, but even so, you are excluding several million people without Netscape from your pages.

Of course, there are varying degrees of dependency on HTML extensions. If you use some of the horizontal rule extensions, for example, most other browsers will ignore the extended attributes and render a conventional horizontal rule. On the other hand, reliance upon a number of font size changes and text alignment extensions to control your document appearance will make your document look terrible on many alternative browsers. It might not even display at all on browsers that don't support the extensions.

We admit that it is a bit disingenuous of us to decry the use of HTML extensions while presenting complete descriptions of their use. In keeping with the general philosophy of the Internet, we'll err on the side of handing out rope and guns to all interested parties while hoping you have enough smarts to keep from hanging yourself or shooting yourself in the foot.

Our advice still holds, though: only use an extension where it is necessary or very advantageous, and do so with the understanding that you are disenfranchising a portion of your audience. To that end, you might even consider providing separate, standards-based versions of your documents to accommodate users of other browsers.

1.5.3 Beyond Extensions: Exploiting Bugs
It is one thing to take advantage of an extension to HTML, and quite another to exploit known bugs in a particular version of a browser to achieve some unusual document effect.

A good example is the multiple-body bug in Version 1.1 of Netscape Navigator. The HTML standard insists that an HTML document have exactly one tag, containing the body of the document.

The now-obsolete browser allowed any number of tags, processing and rendering each in turn. By placing several tags in an HTML document, an author could achieve crude animation effects when the document was first loaded into the browser. The most popular trick used several tags, each with a slightly different background color. This trick results in a document fade-in effect.

The party ended when Version 1.2 of Netscape fixed the bug. Suddenly, thousands of documents lost their fancy fade-in effect. Although faced with some rather fierce complaints, to their credit, the people at Netscape stood by their decision to adhere to the standard, placing compliance higher on their list of priorities than nifty rendering hacks.

In that light, we can unequivocally offer this advice:
never
exploit a bug in a browser to achieve a particular effect in your documents.

1.4 HTML: What It Isn't

1.6 Tools for the HTML

Designer

Chapter 1

HTML and the World Wide

Web

 

1.6 Tools for the HTML Designer

While you can use the barest of barebones text editors to create HTML documents, most HTML

authors have a bit more elaborate toolbox of software utilities than a simple word processor. You also need, at least, a browser, so you can test and refine your work. Beyond the essentials are some specialized software tools for HTML document preparation and editing, and others for developing and preparing accessory multimedia files.

1.6.1 Essentials

At the very least, you'll need an editor, a browser to check your work, and ideally, a connection to the Internet.

1.6.1.1 Word processor or HTML editor?

Some authors use the word-processing capabilities of their specialized HTML editing software.

Others use the WYSIWYG (what-you-see-is-what-you-get) composition tools that come with their browser or latest versions of the popular word processors. Others, such as ourselves, prefer to compose their work on a general word processor and later insert the HTML tags and their attributes.

Still others embed HTML tags as they compose.

We think the stepwise approach - compose, then mark up - is the better way. We find that once we've defined and written the document's content, it's much easier to make a second pass to judiciously and effectively add the HTML tags to format the text. Otherwise, the markup can obscure the content.

Note, too, that unless specially trained (if they can be), spell-checkers and thesauruses typically choke on HTML markup tags and their various parameters. You can spend what seems to be a lifetime clicking the Ignore button on all those otherwise valid markup tags when syntax-or spell-checking an HTML document.

When and how you embed HTML tags into your document dictates the tools you need. We recommend that you use a good word processor, such as WordPerfect or Word, which comes with more and better writing tools than simple text editors or the browser-based HTML editors. You'll find, for instance, that an outliner, spell-checker, and thesaurus will best help you craft the document's flow and content well, disregarding for the moment its look. The latest word processors encode your documents with HTML, too, but don't expect miracles. Except for boilerplate documents, you probably will need to nurse those automated HTML documents to full health.

Another word of caution about automated HTML composition tools: none that we know adhere to the

HTML 4.0 standard (none yet, at least), so examine the specifications before using one, and certainly before purchasing one. Moreover, some of the WYSIWYG HTML editors don't have up-to-date built-in browsers, so they may erroneously decode the HTML tags and give you misleading displays.

1.6.1.2 Browser software

Obviously, you should view your newly composed HTML documents and test their functionality before you release them for use by others. For serious HTML authors, particularly those looking to push their documents beyond the HTML standards, we recommend that you have several browser products, perhaps with versions running on different computers, just to be sure one's delightful display isn't another's nightmare.

The currently popular - and so most important - browsers are Netscape Navigator and Internet Explorer. Obtain free copies of the software via anonymous FTP from their respective servers (

Other books

Kindred by Nicola Claire
The Last Temple by Hank Hanegraaff, Sigmund Brouwer
A Patchwork Planet by Tyler, Anne
Dirty Chick by Antonia Murphy
They Found a Cave by Nan Chauncy
Return to Night by Mary Renault
The Bronze Eagle by Baroness Emmuska Orczy
The Diamond Secret by Suzanne Weyn
A Puzzle for fools by Patrick Quentin