home account info subscribe login search My ITKnowledge FAQ/help site map contact us


 
Brief Full
 Advanced
      Search
 Search Tips
To access the contents, click the chapter and section titles.

HTML 4.0 Sourcebook
(Publisher: John Wiley & Sons, Inc.)
Author(s): Ian S. Graham
ISBN: 0471257249
Publication Date: 04/01/98

Bookmark It

Search this book:
 
Previous Table of Contents Next


Flat or Serial Document Collections

The documents in Figures 2.1 and 2.3 are a part of an essentially flat collection of documents, where all the files are linked together in a linear, or serial, fashion, like pages in a book. However, there are also many hypertext links relating the documents in non–serial ways; for example, one document discussing the IMG element has a sentence mentioning URLs, which, in turn, contains a hypertext link to a document giving a more detailed discussion of URLs. The documents are also ordered hierarchically. Thus, the document discussing the HR element is under the BODY document, which is, in turn, under the Table of Contents (see Figure 2.4). The Table of Contents page contains hypertext links to all the documents in the collection and is an easy tool for quickly finding and accessing a particular section.


Figure 2.1 HTML listing for the document hrule.html, a typical text–only HTML document.

<html>
<head><title> HR element in HTML </title></head>
<body>
[<a href=”htmlindex.html”>Index</a>]  [<a href=”body.html”>Up</a>]
[<a href=”lists_reg.html”>Back</a>]   [<a href=”entities.html”>Next</a>]
<H1> 4.7 Horizontal Ruled Line </H1>
<P>The HR element is used to draw a horizontal dividing line completely across 
the screen. This can be used to logically separate blocks of text, or to separate
icon lists from the body of the text.
<p> The HR element is empty (you don’t need a <code>&lt;/HR></code>).
<h2> Example </h2>
The following illustrates the use of &lt;HR>:
<blockquote>
<pre>
The following document is scanned from the back of 
a cereal box.  To see the scanned image, press the 
icon at the bottom of the text ....
&lt;HR>
&lt;H1> MIGHTY CHOKEE–OS! &lt;/H1>
The cereal of chocolate deprived kiddies everywhere!
&lt;p> Aren’t you lucky your parents love you enough 
to buy you CHOCKEE–OS!
&lt;p> Remember to ask Mom and Dad for NEW SUPER 
CHOCKEE–OS, now with Nicotine!!
</pre>
</blockquote>
<p> <b> This is rendered as:</b> 
<p> The following document is scanned from the back of 
a cereal box.  To see the scanned image, press the 
icon at the bottom of the text ....
<HR>
<H1> MIGHTY CHOKEE–OS! </H1>
The cereal of chocolate deprived kiddies everywhere!
<p> Aren’t you lucky your parents love you enough to buy you CHOCKEE–OS!
<p> Remember to ask Mom and Dad for NEW SUPER CHOCKEE–OS, now with Nicotine!!!
<hr>
<p> [<a href=”htmlindex.html”>Index</a>] [<a href=”body.html”>Up</a>]
    [<a href=”lists_reg.html”>Back</a>]  [<a href=”entities.html”>Next</a>]
</body></html>


Figure 2.2  Netscape Navigator 4 rendering of a typical text–only document (hrule.html).

Navigation Buttons

Note the navigation text icons at the top of the page in Figure 2.2. There are four navigation buttons: Index, Up, Back, and Next. The Index button takes you directly to a Table of Contents page, while the Up button takes you one level up in the hierarchy, in this case, to the BODY page. The Back button takes you backward to the preceding document in the hierarchy, while the Next button takes you forward to the next document. The Back and Next buttons are the ones to use if you want to read the document straight through.

Table of Contents Page

Figure 2.4 shows the HTML table of contents document for this collection (the listing is in Figure 2.3), although only a portion of it appears within the window. Notice how this gives a complete overview of the document tree, including the relative placement of the sections in the hierarchy and the hypertext links to each section. This table of contents was constructed by hand—a tedious process to say the least. Fortunately, there are programs that can automatically generate a hypertext table of contents directly from the HTML documents, using the headings embedded in the documents to create both section names and the hierarchical organization. This is another good reason to use appropriate heading elements. Information about such indexing tools can be found in “Web Management and Maintenance Tools” on the companion Web site.


Figure 2.3 HTML source document for the Table of Contents Page htmlindex.html. Some of this document has been omitted to save space. The rendering of the document is shown in Figure 2.4.

<html><head>
<title> HTML Documentation Table of Contents</title>
</head>
<body>
<h1> HTML Documentation Table of Contents </h1>
<dl>
  <dt><a href=”htmlindex.html”>Table of Contents (this page)</a>
  <dt><a href=”about_the_author.html”>About the Author</a>
</dl>
<ol>
  <li><a href=”intro.html”>Introduction to this Document</a>
  <li><a href=”html_intro.html”>Introduction to HTML </a>
  <ol>
    <li><a href=”elements.html”>HTML Elements</a>
    <li><a href=”doc_struct.html”>HTML Document Structure</a>
    <li><a href=”naming.html”>HTML Document Naming Scheme</a>
  </ol>
  <li><a href=”head.html”>HEAD</a> of an HTML Document
     <ol>
       <li><a href=”title.html”>TITLE</a> 
       <li><a href=”isindex.html”>ISINDEX</a> 
       <li><a href=”nextid.html”>NEXTID</a>
       <li><a href=”link.html”>LINK</a>
       <li><a href=”base.html”>BASE</a>
     </ol>
  <li><a href=”body.html”>BODY</a> of an HTML Document
     <ol>
       <li><a href=”headings.html”>Headings</a> (Hn)
       <li><a href=”paragraph.html”>Paragraphs</a> (P)
       <li><a href=”line_break.html”>Line Breaks</a> (BR)
. . . 
       </ol>
. . . 
     </ol>
</body></html>

General Design Issues: Offering Alternative Formats

There are several other organizational features that you may want to use. For example, you might want to provide a printable version of a document collection.


Figure 2.4  Table of Contents page (htmlindex.html, listed in Figure 2.3) for the HTML document collection containing the file hrule.html (shown in Figure 2.1), as rendered by the NCSA Mosaic for X–Windows browser. This document collection is accessible at www.utoronto.ca/webdocs/HTMLdocs/NewHTML/htmlindex.html

If so, you can join the documents together and present them as a single, large file that clients can download and read as HTML or print as a single file from their browsers. However, if you do this you should let users know what to expect. For example, you can add text to the table of contents (or some other page) that provides a link—plus related information—such as:

<p> This entire archive of documents is also available as a
     single <A HREF=“alldocs.html”>concatenated HTML document</A> 
    (198 Kbytes), suitable for printing.  Note, however, that 
    the hypertext links in this document have been removed.</P>

This guides users to a document that can be both viewed and printed, but also warns that the file is big, and that certain functions available in the discrete files are not present. The user can then decide whether to click on the phrase “concatenated HTML document” and access the resource.


Previous Table of Contents Next


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.