Targets and Anchors
Create a link to a specific place in a page.
Links can also be used to move a reader to a particular spot in a document, rather than to the top, which is the default. To link to a specific spot in a document, you need to use a special "NAME" anchor to label the location within the document where you would like your link to go. It looks like this:
<A NAME="label">text</A>
Once you have added one or more "named" anchors to your document, you can link to them.
Links to Specific Spots in Different Documents:
Suppose you want to set a link from document A (documentA.html) to a specific spot in document B (documentB.html).
First, create the named anchor "spot" in documentB.html with the following code:
<A NAME="spot">spot</A>
Next, enter the HTML coding in document A for a link to the "named anchor" in document B this way:
<A HREF="documentB.html#spot>spot</A>
With both these elements, you can bring a reader from document A to the exact "spot" in document B.
Links to Specific Spots within the Same Document:
The technique is the same, except you create a URL with the file name omitted.
For example, to link to "spot" from a location within document A:
First you must include the "name" anchor:
<A NAME="spot">spot</A>
Then use this link to go to that anchor:
<A HREF="#spot>spot</A>
This should result in the ability to jump from one spot in a document to another.
Do the following:
See Anchors Castro pp. 110, 111 (alt. pp. 120, 121)