WebHints: Hyperlinks

Hypertext Anchors

In order to have hypertext links, one must have: Anchor elements (<A>Anchor material</A>) can be either or both of these. If an anchor has a HREF attribute, then it acts as a pointer. If an anchor has a NAME attribute, then it acts as the target. Each anchor must have one or the other:
HREF
A hypertext reference. The presence of this attribute indicates that the anchor is a pointer to a hypertext target. The value of the attribute should be a URL specifying the target. The anchor material will be highlighted by the browser as a hyperlink button.
NAME
A hypertext target. The presence of this attribute indicates that the anchor is a hypertext target within its enclosing document. The value of the attribute identifies the target within the set of such targets within the document.

Here's an example of a URL that is a target only:

<A NAME="Sloth">This is a target called Sloth.</A>
This is a target called Sloth.

Here is an example of an anchor that points to the sloth anchor above:

<A HREF="#Sloth">Click here to jump to the Sloth!</A>

Click here to jump to the Sloth!!

Hint: Although it usually makes sense for the anchor text to be descriptive of the target, sometimes it makes sense to actually make this text the URL for the target. This way, the user can see where the URL points and can see the URL if the document is printed out as text.

Obscure Or Proposed Anchor Attributes

Some obscure anchor attributes are:
REL
For anchors containing HREF attributes only. This field describes the relationship between the present document, and the one pointed to. This field is not yet widely supported.
REV
For anchors containing HREF attributes only. This field describes the relationship between the present document, and the one pointed to, but from the point of view of the pointed to document. This field is not yet widely supported.
URN
Universal Resource Number. Unused.
TITLE
For anchors containing HREF attributes only. This attribute can be used to provide the user with a sneak preview of the title of the target document without the user having to actually access it. Such title fields can become out of date. This field is currently not widely supported.
METHOD
Gives a list of HTTP methods supported by the hypertext target. Another obscure and unused attribute. This field is currently not widely supported.
In addition, HTML+ proposes the following attributes:
ID
Identical to the NAME attribute.
EFFECT
For anchors containing HREF attributes only. Indicates how the hyperjump should be made. A value of replace indicates that the current document should be replaced on the screen by the target document. A value of new means that a new window should be spawned. A value of overlay means that the document should be displayed in a pop-up window.
PRINT
Indicates how hypertext links should be rendered if the document is printed. Values are reference, footnote, sidebar, section, silent.
TYPE
This attribute allows the specification of the MIME type of the target document


* * Webmaster: ross@ross.net
Linkhere: Click here to find out how to link here.
Copyright: Copyright © Ross N. Williams 1995-1996. All rights reserved.