HTML: The Definitive Guide

Previous Chapter 12 Next

Tips, Tricks, and Hacks

Top of the Tips
Trivial or Abusive?
Title Marquee
Custom Bullets
Tricks with Tables
Transparent Images

We've sprinkled a number of tips, tricks, and hacks throughout this book, along with style guidelines, examples, and instructions. So why have a special chapter on tips, tricks, and hacks of HTML? Because it's where most readers will leaf to when they pick up this book for the first time. HTML is the language, albeit constrained, that makes the World Wide Web on the Internet the exciting place that it is. And interested readers want to know, ``How do I do the cool stuff?''

12.1 Top of the Tips

The most important tip for even veteran HTML authors, and one that bears repeating, is surf for yourself. We can show and explain a few neat tricks to get you started, but there are thousands of HTML authors out there combining and recombining HTML tags and juggling content to create compelling and useful documents.

Get a bona fide Internet account; get a copy of Mosaic, Netscape, Internet Explorer, whatever; get connected; and get cruising. Collect Web site URLs from friends, business associates, and the traditional media. Even local TV and radio stations have taken to announcing some of their sponsors' Web site URLs. And consult the many different Internet Web directories like Yahoo and Webcrawler for new and up-to-date addresses for the Web sites that suit your lifestyle or business niche.

Examine (don't steal) their pages for eye-catching and effective pages and use them to guide your own creations. Capture and examine the source HTML documents for the juicy bits. Get a feel of the more effective Web collections. How are their documents organized? How large is each document? And so on.

We all learn from experience, so go get it.

Design for Your Audience

We continuously argue throughout the book that, with HTML documents, content matters most, not look. That doesn't mean presentation doesn't matter.

Effective HTML documents match your target audience's expectations, giving them a familiar environment in which to explore and gather information. Serious academicians expect a treatise on the physiology of the kumquat to appear journal-like: long on meaningful words, figures, and diagrams; short on frivolous trappings like cute bullets and font abuse. Don't insult the reader's eye, except when exercising artistic license to jar or attack your reader's sensibilities.

By anticipating your audience and by designing your documents to appeal to their tastes, you also subtly deflect unwanted surfers from your pages. Undesirables, such as penniless college students surfing your commercial site, may hog your server's resources and prevent the buying audience you desire from ready access to your pages.

For instance, use subtle colors and muted text transitions between sections for a classical art museum's collection to mimic the hushed environment of a real classical art museum. The typical rock-n-roll crazed Web surfer maniac probably won't spend more than a glance at your site, but the millionaire arts patron might.

Also, use effective layout to gently guide your readers' eyes to areas of interest in your documents. Do that by adhering to the basic rules of document layout and design, such as placing figures and diagrams nearby if not inline with their content reference. Nothing's worse than having to scroll up and down the browser window in a desperate search for a picture that can explain everything.

We won't lie and suggest that we're design experts. We aren't, but they're not hard to find. So, another tip for the serious Web page author: Seek professional help. The best situation is to have design experience yourself. Next best is to have a pro looking over your shoulder, or at least somewhere within earshot.

Make a trip to your local library and do some reading on your own, too. Even better yet, browse the various online HTML guides. Check out Designing for the Web by O'Reilly & Associates. Your readers will be glad you did. [design tools, 1.6]

Boilerplate HTML Documents

The next best tip we can give you is reuse your documents. Don't start from scratch each time. Rather, develop a consistent framework, even to the point of a content outline into which you add the detail and character for each page.

Here's our contribution to help start your boilerplate HTML document collection. The following source contains what the HTML standard currently tells us is the minimum content that should appear in every HTML document (regardless of what the browsers might let you get away with) and then some added for document clarity. Use it as a skeleton for your own HTML documents:

<title>Required--replace this title with your own</title>
<h3>Reiterate the title here</h3>
...Insert your document's contents here...
<address>Include your name and contact information
usually at the end of the document</address>

Previous Home Next
Efficiency considerations Book Index Trivial or Abusive?