HTML: The Definitive Guide

Previous Chapter 5 Next
 

5.7 Other Multimedia Content

The Web is completely open-minded about the types of content that can be exchanged by servers and browsers. In this section, we look at a different way to reference images, along with audio, video, and other document formats.

Embedded Versus Referenced Content

Images currently enjoy a special status among the various media that can be included within an HTML document and displayed in line with other content by all but a few browsers. Sometimes, however, as we discussed earlier in this chapter, you may also reference images externally, particularly large ones whose details are important, but not immediately necessary to the document content. Other multimedia elements, including digital audio and video, currently must be referenced as separate documents external to the current one. However, recent innovations in browser technology and extensions to HTML are lifting those barriers and allowing for more integration of multimedia in Web documents. Internet Explorer, for instance, has extensions for inline movies and background audio. Applets with Netscape or HotJava also enable multimedia display integrated with the HTML page. [video extensions, 5.2.7] [background audio, 5.4] [applets, 5.6.1]

You normally use the anchor tag (<a>) to link external multimedia elements to the current document. Just like other link elements selected by the user, the browser downloads the multimedia object and presents it with help from a helper application to the user. Referenced content is always a two-step process: present the document that links to the desired multimedia object, then present the object if the user selects the link. [<a>, 6.3.1]

In the case of images, you can choose how to present images to the user: inline and immediately available via the <img> tag, or referenced and subsequently available via the <a> tag. If your images are small and critical to the current document, you should provide them inline. If they are large or are only a secondary element of the current document, make them available as referenced content via the <a> tag.

If you choose to provide images via the <a> 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.

Referencing Audio, Video, and Images

You reference any external document, regardless of type or format, in an HTML document via a conventional anchor (<a>) link:

The <a href="sounds/anthem.au">Kumquat Grower's Anthem</a> 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.

Table 5-1: Common Multimedia Formats and Respective Filename Extensions
Format Type Extension Platform of Origin
GIF Image gif Any
JPEG Image

jpg, jpeg, jpe

Any
XBM Image xbm UNIX
TIFF Image tif, tiff Any
PICT Image pic, pict Any
Rasterfile Image ras Sun
MPEG Movie mpg, mpeg Any
AVI Movie avi Microsoft
QuickTime Movie qt, mov Apple
AU Audio au, snd Sun
WAV Audio wav Microsoft
AIFF Audio aif, aiff Apple
MIDI Audio midi, mid Any
PostScript Document ps, eps, ai Any
Acrobat Document pdf Any

Appropriate Linking Styles

Creating effective links to external multimedia documents is critical. Since the browser cannot play or display the object directly (except for some inline images), 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.

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 plugin accessory software and, as described earlier in this chapter, applets which 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 the users' browsers have the plugin 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.


Previous Home Next
Executable Applications Book Index Beyond HTML