HTML The Definitive Guide (60 page)

Read HTML The Definitive Guide Online

Authors: Chuck Musciano Bill Kennedy

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

If you choose to provide images via the tag, it is sometimes a courtesy to your readers to indicate the size of the referenced image in the referencing document and perhaps provide a thumbnail sketch. Users can then determine whether it is worth their time and expense to retrieve it.

5.6.2 Referencing Audio, Video, and Images
You reference any external document, regardless of type or format, in an HTML document via a conventional anchor (
) link: The Kumquat Grower's Anthem is a rousing tribute to the thousands of 'quat growers around the world.

Just like any referenced document, the server delivers the desired multimedia object to the browser when the user selects the link. If the browser finds the document is not HTML, but some other format, it automatically invokes an appropriate rendering tool to display or otherwise convey the contents of the object to the user.

You can configure your browser with special helper applications that handle different document formats in different ways.

Audio files, for example, might be passed to an audio-processing tool, while video files are given to a video-playing tool.

If a browser has not been configured to handle a particular document format, the browser will inform you and offer to simply save the document to disk. You can later use an appropriate viewing tool to examine the document.

Browsers identify and specially handle multimedia files from one of two different hints: either from the file's Multipurpose Internet Mail Extension (MIME) type provided by the server or from a special suffix in the file's name. The browser prefers MIME because of its richer description of the file and its contents, but will infer the file's contents (type and format) of the object by the file suffix;
.gif
or
.jpg
, for GIF and JPEG encoded images, for example, or
.au
for a special sound file.

Since not all browsers look for a MIME type, nor will they all be correctly configured with helper applications by their users, you should always use the correct file suffix in the names of multimedia objects. See
Table 5.1
for examples.

5.6.3 Appropriate Linking Styles

Creating effective links to external multimedia documents is critical. The user needs some indication of what the object is and perhaps the kind of application the linked object needs to execute. Moreover, most multimedia objects are quite large, so common courtesy tells us to provide users with some indication of the time and expense involved in downloading it.

In lieu of, or in addition to, the anchor and surrounding text, a small thumbnail of large images or a familiar icon that indicates the referenced object's format may be useful.

5.6.4 Embedding Other Document Types

The Web can deliver nearly any type of electronic document, not just graphics, sound, and video files. To display them, however, the client browser needs a helper application installed and referenced. Recent browsers also support plug-in
accessory software and, as described in Chapter 13
,
may extend the browser for some special function, including inline display of multimedia objects.

For example, consider a company whose extensive product documentation was prepared and stored in some popular layout application like FrameMaker, Quark XPress, or PageMaker. The Web offers an excellent way for distributing that documentation over a worldwide network, but converting to HTML would be too costly at this time.

The solution is to prepare a few HTML documents that catalog and link the alternative files and invoke the appropriate display applet. Or, make sure that the users' browsers have the plug-in software or are configured to invoke the appropriate helper application - FrameMaker, for example, if the document is in FrameMaker format. Then, if a link to a FrameMaker document is chosen, the tool is started and accordingly displays the document.

5.5 Animated Text

6. Document Layout

Chapter 6
6. Document Layout
Contents:

Creating Whitespace

Multicolumn Layout

Layers

HTML was conceived in academia, not on Madison Avenue. It was originally intended to be an easy-to-use markup language to help people make their documents more readable through text embellishments like headers as well as more extensible to their own and others' work through hyperlinks, and include other media besides text - not for pizzazz, but to better explain and illustrate their work. HTML is not a page layout tool. Well, at least not yet.

As we discussed in
Chapter 1, HTML and the World Wide Web, the language has evolved with the

Internet itself. In particular, chances are probably a hundred to one that the web user is now not a college professor doing research, but a youngster surfing for a cool site or a buyer shopping for product information and the best deal. Commercial interests - the driving force of the Web today -

demand increasingly complex page formats and visual displays to attract the ever-growing population of users, emphasizing look and feel over content.

From the start of their enterprise, the developers at Netscape have been at the forefront of browser design that addresses the needs of commercial interests. Throughout the years, they have consistently extended HTML to provide authors with far more sophisticated page layout capabilities than previous versions.

In this chapter, we cover three new features that are unique to Netscape Navigator: spacers, multiple columns, and layers. These new tags are seductive in the extreme, luring the designer away from the HTML standard with the promise of exciting new page layout capabilities. As always, we admonish you to use these extensions only where absolutely necessary, since you alienate a portion of your audience each time you elect to include these tags in your documents.

6.1 Creating Whitespace

One of the simplest elements in any page design is the empty space surrounding content. Empty space is often just as important to the look and feel of a page as the areas filled with text and images.

Commonly known as
whitespace
, these empty areas shape and contain the content of your page.

Native HTML has no way to create empty space on your page, short of using a

 tag filled with blank lines or an empty image. In fact, browsers - acting according to the HTML standard - remove

Other books

Night of the Purple Moon by Cramer, Scott
Lake Wobegon Days by Garrison Keillor
The Dutch Girl by Donna Thorland
The Marriage Wager by Ashford, Jane
Hot Property by Carly Phillips
A Study in Silks by Emma Jane Holloway
Dust Devils by Smith, Roger
Home is Where You Are by Marie, Tessa
Who's Your Daddy? by Lauren Gallagher
Burning the Days by James Salter