The Contents file (*.hhc) provides a Table of Contents that the
user of the compiled Help file can view in order to navigate the HTML Help file's
topics (see Figure 7.24).

FIGURE 7.24 The Contents of an HTML Help
file as seen by the end user.
Listing 7.5 provides a simple
example of a Contents file.
LISTING 7.5
A SAMPLE HTML HELP CONTENTS FILE
<HTML>
<HEAD>
</HEAD><BODY>
<UL>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Personal
information">
</OBJECT>
<UL>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Gender">
<param name="Local" value="html\Gender.htm">
</OBJECT>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Marital
Status">
<param name="Local" value="html\maritalstatus.htm">
</OBJECT>
</UL>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Benefits">
</OBJECT>
<UL>
<LI> <OBJECT type="text/sitemap">
<param name="Name" value="Medical
Insurance">
<param name="Local" value="html\Medicalinsurancestatus.htm">
</OBJECT>
</UL>
</UL>
</BODY></HTML>
Like an Index file, a Contents
file is really a specialized HTML file that
also uses the same HTML format as the Index
file, that of the unnumbered list of OBJECTS
(with standard HTML tags such as <UL>…</UL>,
<LI>…</LI>, and <OBJECT>…/OBJECT>).
Also like an Index file, a Contents
file is optional. As the Listing illustrates,
the lists in Contents files differ from those
of Index files because Contents lists can be
nested in various levels of depth. This nesting
then implements subsections and sub-subsections
in the Table of Contents.
Each OBJECT of type "text/sitemap"
in the unnumbered HTML can represent a topic
with a single Table of Contents entry pointing
to it. For example in the listing, we see that
the Help topic furnished by the file MedicalInsuranceStatus.htm
is referred to by the Table of Contents entry
"Medical Insurance." You can add
a reference to a Contents file to your project
by using the Files tab on the Project Options
dialog (available from the Change Project Options
icon on the main screen of the HTML Help Workshop).
You can automatically create and maintain a Contents file using
the Contents tab on the main project screen.