Linking to a Particular Place within a Document

Particular places in an HTML document can be marked as specific destinations of hypertext links via the NAME attribute. For example, suppose a place in a document is marked via
<A NAME="topic1">Topic 1</A>
This tag is simply a placeholder that defines a target location in a document. The text "Topic 1 #" appears normally and isn't something that can be clicked on.

From within this document we can create a hypertext link to this place by specifying the anchor:

<A HREF="#topic1">(see Topic 1)</A>
This tag is a link (it appears as something that can be clicked on). The HREF= part of it (HREF for Hypertext REFerence) tells your browser where to jump to.

If we wanted to reference this place from another document in the same directory we would put the following tag.

<A HREF="doc.html#topic1">(see Topic 1)</A>

An good example would be a long document that has many sections and an index at the top. By clicking on an index entry at the top, you could jump down the document to a particular section. See the NACS' individual page.

Note that in the <A HREF="address"> tag, if the address starts with a "#", then it is interpreted to be a target location within a document.


[Next] [Previous] [Index]


HTML 2.0 Checked