Anchors & Links

Hypertext links are items you can click to instantly view another topic or document.

Hypertext links can point to:

  1. another section in the same document
  2. an entirely different document
  3. a different web page
  4. a variety of other web objects

Creating Anchors

The <a> tag creates an anchor, which is text that is marked so you can link to it from other points in the document. Anchored text will become the destination of a link you later create. Anchored text is not the text you click. You assign each anchor its own anchor name, using the NAME property.

Creating Links

To create a link to an anchor, add the HREF property to the A tag. HREF is short for Hypertext Reference. HREF indicates the location to jump to. HREF can refer to an anchor you place in a document, or, as we will see in moment, HREF can refer to a totally different document on the web. You link to an anchor using the anchor name preceded by a pound ( # ) symbol.