[an error occurred while processing this directive]
Links to Points within a Document
This page is part of the WebCom Web Publishing Guide. It explains how to create hotlinks to points within a HTML document.Overview
Hotlinks to points within other documents (or the same document) can be created. When one of these hotlinks is selected, the document pointed to is loaded (if necessary), and displayed starting at the point specified by the hotlink. Note: if the hotlink points to a section near the end of the document, the point selected will be displayed far enough down to fill the the display area of the browser.Anchoring a Piece of Text
A section of text must be enclosed within an anchor, so that hotlinks can point to it:
<A NAME="LINKNAME">Anchored Text</A>
This creates an anchored piece of text. Hotlinks to it can be created from within the document itself, or from other documents. The anchor must enclose a piece of text. Anchors surrounding nothing will confuse many browsers.
To refer to this anchored text from another document, use a standard hotlink, with "#LINKNAME" appended to it. The hotlinks below demonstrate the effect of this, and provide examples of the code used.
This is a hotlink to a document. The document will be displayed at its start:
Hotlink to Example Page.
The code for this hotlink:
<A HREF="/example/example.shtml">Hotlink to Example Page</A>
This is a hotlink to a point within the document above. The document will be displayed at the point specified in the hotlink:
Hotlink to Word Theta in Example Page
The code for this hotlink:
<A HREF="/example/example.shtml#WORD">Hotlink to Word Theta in Example Page</A>
To refer to this point from within the document itself, use a standard hotlink, with #LINKNAME alone between the quotes (see the Example Page for an example and the code used to produce it.):
<A HREF="#LINKNAME">Label for Hotlink</A>