Linking to a specific location on a page |
|
An anchor is used to name a particular spot within a document. To define an anchor, use this sequence:
<a name="anchor-name">text</a>
This defines a named anchor at the location of the text, so
links elsewhere can point to this spot.
To make a link to an anchor:
<a href="#anchor-name">text</a>
This displays the given text with a link to
anchor-name.
Suppose, for example, you want to link from the top of your page to an occurrence of the phrase ``water conservation.'' First you create an anchor where you want to jump to:
<a name="watercons">water conservation</a>
Then, at the top of your page, you put:
See the <a href="#watercons">section on water conservation</a>
below.
To set up a link that jumps to specific location in a different document:
<a href="URL#anchor-name">text</a>
where URL is the URL of the page to which you want to link,
and anchor-name is an anchor defined on that page.