Hyperlink
[A Href]

 
End Tag: Required
Support Key: 2 | 3 | 3.2 | IE1 | M1 | N1
What is it?
Attributes
Tag Example
Parent/Content Model
Tips & Tricks
Browser Peculiarities
= Index DOT Html by Brian Wilson [bloo@blooberry.com] =
Main Index | Top Of Tree | Tag Index | Tag History


What is it?
The A tag is one of the key distinctive features of HTML which defines a link that allows webs of information to be created. The Hyperlink element indicates a portion of text and/or an object that serves as a hot area for the user to activate to jump to another location. The A tag can serve as a destination of a URL, an invocation of a URL, or both at the same time.

To invoke invoke a Bookmark either in a current document or in a remote document, the Bookmark NAME must be prefaced by a hash mark symbol ("#") [See examples below.] If no Bookmark is specified in the HREF statement, the browser will default to the top of the document.
Attributes
Href
2 | 3 | 3.2 | IE1 | M1 | N1
Required? No
Description:
This attribute indicates the URL to be loaded when the hyperlinked object is activated. Either this attribute or the NAME attribute MUST be present in the A tag.
Values: Either relative or absolute URLs.
Name
2 | 3 | 3.2 | IE1 | M1 | N1
Required? No
Description:
This attribute assigns a symbolic name to the enclosed object (text, image, etc.) in order to use it as a destination in a hyperlink or other URL call. Either this attribute or the HREF attribute MUST be present in the A tag.
Values: Alphanumeric characters.
Target
2 | 3 | 3.2 | IE3A1 | M | N2
Required? No
Description:
This attribute specifies the named frame for the HREF hyperlink to jump to when activated.
Values: The TARGET reserved names apply.

Event Handler Attributes
[For more information on Event Handlers, please see the SCRIPT page.]
onClick
2 | 3 | 3.2 | IE3B1 | M | N2B3
Required? No
Description:
A click Event Handler executes Script code when a hyperlink is clicked.
Values: Script statements or an external function call.
onMouseOver
2 | 3 | 3.2 | IE3B1 | M | N2B3
Required? No
Description:
A mouseOver Event Handler executes Script code once each time the mouse pointer moves over a hyperlink from outside the hyperlink.
Values: Script statements or an external function call.
onMouseOut
2 | 3 | 3.2 | IE | M | N3
Required? No
Description:
A mouseOut Event Handler executes Script code once each time the mouse pointer exits from the bounds of a hyperlink from inside the hyperlink.
Values: Script statements or an external function call.

Other Attributes
Methods
2 | 3 | 3.2 | IE | M | N
Required? No
Description:
This attribute should specify methods to be used in accessing the destination, as a whitespace-separated list of names. For similar reasons as for the TITLE attribute, it may be useful to include the information in advance in the link. For example, the browser may choose a different rendering display (possibly a special icon) for a destination that is searchable. None of the popular browsers ever implemented this attribute and it has since disappeared from the current HTML 3.2 Draft.
Values:
The set of applicable names is a function of the protocol scheme of the URL in the HREF attribute.
Rel
2 | 3 | 3.2 | IE | M | N
Required? No
Description:
The REL attribute is not currently used by any of the popular browsers, but is meant to give the relationship(s) described by the hyperlink.
Values: A whitespace separated list of relationship names.
Rev
2 | 3 | 3.2 | IE | M | N
Required? No
Description:
The REL attribute is not currently used by any of the popular browsers. It is basically meant to be the same as the REL attribute, but the semantics of the relationship are in the reverse direction. A link from A to B with REL="X" expresses the same relationship as a link from B to A with REV="X". An anchor may have both REL and REV attributes.
Values: A whitespace separated list of relationship names.
Title
2 | 3 | 3.2 | IE | M | N
Required? No
Description:
This attribute suggests a title (advisory only) for the destination resource. The TITLE attribute may be used for display prior to accessing the destination resource (such as in a margin note or in a pop-up box while the mouse is over the hyperlink), or for resources that do not include titles (like graphics, plain text documents or Gopher menus.)
Values: An alpanumeric string.
URN
2 | 3 | 3.2 | IE | M | N
Required? No
Description:
This attribute was originally meant to specify a more persistent identifier for the NAME value of the hyperlink, but none of the popular browsers ever implemented this attribute. It has since disappeared from the current HTML 3.2 Draft.
Values: NA

Style Sheet Attributes
[More on Cascading Style Sheets]
Class
2 | 3 | 3.2 | IE3B1 | M | N4B2
Required? No
Description:
This represents an assigned semantic classification grouping(s) for the current tag.
Values:
Given as a comma separated list of alphanumeric characters. Class names may contain spaces (multiple consecutive spaces treated as a single space.)
ID
2 | 3 | 3.2 | IE3B1 | M | N4B2
Required? No
Description:
This assigns an alpha-numeric identifier that is unique to this tag instance. Style sheets may use this attribute to reference the current instance of this tag. Hyperlinks may also use this identifier to serve as a destination.
Values:
An alphanumeric string - initial character must be a letter followed by alphabetic characters, digits, "-" or "." characters. The allowable set of alpha-characters is restricted to the A-Z and a-z set.
Style
2 | 3 | 3.2 | IE3B1 | M | N4B3
Required? No
Description:
This attribute is a text string that provides rendering style information for the current tag.
Values:
Please see the description of inline styles for more information on how to use this attribute and its possible values.
Example
Hyperlink to a document:
<a  HREF="http://www.foo.com/index.html" TARGET="frame1">
Link text that leads to index.html at www.foo.com
</a>
Hyperlink to a Bookmark in the current document:
<a  HREF="#Bookmark1" TARGET="frame1">
Link text that leads to Bookmark1 in the current document
</a>
Hyperlink to a Bookmark in an external document:
<a  HREF="http://www.foo.com/index.html#Bookmark1" TARGET="frame1">
Link text that leads to Bookmark1 in index.html at www.foo.com
</a>
Parent Model
%Virtual Formatting% | %Physical Formatting% | %Block Format Parent% | %Multimedia Parent% | <Body> | <Address> | <Basefont> | <Heading> | <Marquee>
Content Model
%Text% | %Virtual Formatting% | %Physical Formatting% | %Line Break Content% | %Multimedia Content%
Tips & Tricks Browser Peculiarities
Boring Copyright Stuff...