HTML and CSS Reference
In-Depth Information
Input
<p> The Bookworm Bookshop <br />
1345 Applewood Dr <br />
Springfield, CA 94325 <br />
(415) 555-0034
</p>
Adding the Table of Content s The page you're creating will require a lot of
scrolling to get from the top to the bottom. One nice enhancement is to add a small table
of contents at the beginning of the page, listing the sections in a bulleted list. If a reader
clicks one of the links in the table of contents, he'll automatically jump to the section
that's of most interest to him. Because you've created the anchors already, it's easy to see
where the links will take you.
You already have the heading for the table of contents. You just need to add the bulleted
list and a horizontal rule, and then create the links to the other sections on the page. The
code looks like the following:
Input
<a name=”contents”><h2> Contents </h2></a>
<ul>
<li><a href=”#about”> About the Bookworm Bookshop </a></li>
<li><a href =”#recent”> Recent Titles </a></li>
<li><a href =”#upcoming”> Upcoming Events </a></li>
</ul>
<hr />
Figure 7.15 shows an example of the introductory portion of the Bookworm Bookshop
page as it appears in a browser.
.
Output
FIGURE 7.15
The top section of
the Bookworm
Bookshop page.
7
 
 
Search WWH ::




Custom Search