|
To access the contents, click the chapter and section titles.
HTML 4.0 Sourcebook
In some cases, you might want to make the entire document collection available as an archive. Then, users who make extensive use of the documents can copy down the entire HTML collection and install it on their own machines, reducing the load on your server and increasing the speed with which they can access the material. If you are using a PC, you might make such an archive using the programs PKZIP or WinZip. This lets you archive multiple files and directories in a single compressed file, usually with the filename extension .zip. For example, you could archive all the files from a collection in a file named alldocs.zip. On Macintoshes, the StuffIt program serves a similar function: StuffIt creates archive files with the filename extension .sit. UNIX users will use a program called tar (for tape archiver), which could yield the archive file alldocs.tar. UNIX also has two programs for compressing programs: compress, which places a .Z at the end of the compressed filename, and gzip, which places a .z or .gz at the end of the compressed filename. This would yield the compressed archive files alldocs.tar.Z (using compress) or alldocs.tar.gz (using gzip), sometimes shortened to alldocs.tgz. If you were generous in preparing archives for multiple platforms, you might prepare a document section pointing to these files. An example of such a document is shown in Figures 2.5 and 2.6. Most HTTP servers let you restrict access to certain files or directories on the server. You can then choose to control access to archives, should there be copyright problems associated with the archive content. Figure 2.5 Example HTML document src_link.html that contains links to alternative formats of a document collection. Clicking on the items retrieves the archives to the clients machine. <HTML> <HEAD><TITLE> Archives of this Documentation </TITLE></HEAD> <BODY> <H2> Document Archives </H2> <p> Archives of the document collection are available in the following formats: <OL> <LI><A HREF=alldocs.zip>alldocs.zip</A> (138 Kbytes) <EM> DOS PKZIP </EM> <LI><A HREF=alldocs.sit>alldocs.sit</A> (532 Kbytes) <EM> Macintosh Stuffit</EM> <LI><A HREF=alldocs.tar>alldocs.tar</A> (527 Kbytes) <EM> UNIX tar </EM> <LI><A HREF=alldocs.tar.Z>alldocs.tar.Z</A> (133 Kbytes) <EM> UNIX tar (compressed)</EM> <LI><A HREF=alldocs.tar.z>alldocs.tar.z</A> (104 Kbytes) <EM> UNIX tar (gnuzipped) </EM> <LI><A HREF=alldocs.html>alldocs.html </A> (523 Kbytes) <EM> Concatenated HTML documents </EM> <UL> <LI><EM>This is a concatenation of the HTML documents, suitable for printing from a browser. The Hypertext links have been removed.</EM> </UL> </OL> <HR NOSHADE>
<B>Last Update:</B> <EM>12 July 1996</EM> &lt;<A HREF=mailto:[email protected][email protected]</a>&gt; </BODY></HTML> Nesting of List ElementsAs a final HTML aside, note that Figure 2.6 illustrates how different types of lists can be nested. Here, an unordered list element (UL) is nested inside an ordered list (OL): <OL> <LI><A HREF=alldocs.zip>......... . . <LI><A HREF=alldocs.html>alldocs.html</A> (523 Kbytes) ..... Concatenated HTML documents </EM> <UL> <LI>(This is a concatenation of the ..... </UL> </OL> The browser does exactly what you would expect, and simply nests one list inside the other. In HTML, any type of list can be nested within another list. Recall, however, that you cannot put lists inside headings or headings inside lists. Lessons from Example 4
Exercises for Example 4There are several examples of booklike document collectionshave a look at them, and see how they compare with the model described here. Some examples are: Navigation icons are found in almost all document collections, not just booklike ones. Look for them the next time you are on the Web and note how their presence makes it easy to navigate within the collection. Example 5: Linking to DataImages, Movies, and AudioAs mentioned earlier, Web browsers can only display certain image formats and sometimes restrict GIF images to fewer than 50 or so displayed colors per image. Further, small images are advantageous, since large images can take a long time to download and are often irritating for that reason alone. However, sometimes these image format restrictions are unreasonable. Often you need to include a large image that is an important part of your materialfor example, a still from a movie (for a film publicity site), or a campus map that can be clicked on to access information about various campus buildings. For both of these cases, a tiny image is unacceptable. Furthermore, you may have truly highquality GIF images containing 256 colors, or perhaps nonGIF format images, and want to make them available for viewing. Perhaps you even have movie or sound files. How can these options be included in a document and presented to your clients? Large ImagesSmall FilesIf you need a large image on a main page, the key is to make the image file small. Remember that GIF and JPEG store images in a compressed format and as a result, you can often process an image so that the file is small, even if the image itself is very large. Chapter 3 discusses these and other issues associated with processing images for use on the Web. Linking to Large ImagesIf you have secondary pages containing large image files, the key to good design is simply to warn the user of what to expect and to place this warning near the hypertext anchors pointing to these secondary pages. This gives the user several options: accessing the page as is; disabling image loading when accessing the page; or not accessing the document altogether. Thumbnail SketchesA thumbnail sketch is a particularly useful way of linking to a large image. A thumbnail is just a reduced size icon of the actual image or of some characteristic portion of the image. Thumbnails are easy to make with any commercial or publicdomain image editing program. You can then include the thumbnail in your document, and make a hypertext link from the thumbnail to the document containing the large image. This is done in Figure 2.7, where the small images are links to larger images or to movie files. In this example, the thumbnail of the larger GIF image is only 1,500 bytes in size, onetenth the size of the original file. Note that sizes of the linked documents are also giventhese are big files! Extra information such as this is useful to readers, as it lets them know what to expect.
|
Products | Contact Us | About Us | Privacy | Ad Info | Home
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc. All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited. Read EarthWeb's privacy statement. |