8.5.2 Building a Table of Contents

For guides with more than one HTML page, it can be useful to provide a table of contents so that the user can browse the guide more easily as shown in this example:

The Table of Contents is achieved in the User Agent with an HHC file. HHC files are often created as part of compiled HTML (CHM) guides, or can be created manually using a text editor.

The following HHC file produces the table of contents with five items as shown in the preceding screen capture:

 
<html><body>
  <ul>
    <li>
      <object type="text/sitemap">
        <param name="Name" value="How to Use the User Agent">
        <param name="Local" value="index.html">
      </object>
    </li>
    <ul>
      <li>
        <object type="text/sitemap">
          <param name="Name" value="Uploading Orders">
          <param name="Local" value="upload.html">
        </object>
      </li>
      <li>
        <object type="text/sitemap">
          <param name="Name" value="Troubleshooting">
          <param name="Local" value="trouble.html">
        </object>
      </li>
      <ul>
        <li>
          <object type="text/sitemap">
            <param name="Name" value="Network Problems">
            <param name="Local" value="network.html">
          </object>
        </li>
        <li>
          <object type="text/sitemap">
            <param name="Name" value="Miscellaneous">
            <param name="Local" value="misc.html">
          </object>
        </li>
      </ul>
    </ul>
  </ul>
</body></html>