Hyperlink
[A Href]

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


What is it?
The A element is one of the key distinctive features of HTML. It defines a link between resources 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 element can serve as a destination of a URL, an invocation of a URL, or both at the same time.

To 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.

Common Attributes
%Core%
2 | 3 | 3.2 | 4 | IE3 | M | N4B3 | O
%Events%
2 | 3 | 3.2 | 4 | IE4B1 | M | N | O
%Language%
2 | 3 | 3.2 | 4 | IE4 | M | N | O

Specific Attributes
Accesskey
2 | 3 | 3.2 | 4 | IE4B1 | M | N | O
Required? No
Description:
This is a method of giving access/focus to an active HTML element using a keyboard character. This is a common GUI paradigm also known as a "keyboard shortcut" or "keyboard accelerator" A single character is used as the value of this attribute. In addition, a platform-dependent key is usually used in combination with the ACCESSKEY character to access the functionality of the active field.
Values:
A single, case-insensitive alphanumeric character from a browser's character set.
Charset
2 | 3 | 3.2 | 4 | IE | M | N | O
Required? No
Description:
This attribute indicates the character encoding of the destination resource of the hyperlink.
Values:
A recognized RFC 2045 language character set string. Default is ISO-8859-1.
Coords
2 | 3 | 3.2 | 4 | IE | M | N | O
Required? No
Description:
This specifies the coordinate values in pixels appropriate to the accompanying SHAPE attribute to define a region of an image for hyperlinking. The coordinate system for Client Side Image Maps originates at the top, left corner of the image and values grow larger as you move down and to the right.
These are the corresponding SHAPE types and COORDS definition schemes:
   RECT, RECTANGLE: COORDS="left,top,right,bottom"
   CIRC, CIRCLE:            COORDS="center_x,center_y,radius"
   POLY, POLYGON:       COORDS="x1,y1,x2,y2,...,xn,yn"
[The Polygon values specify the successive coordinates of the polygon and have no explicit limit on number of vertices, but HTML limits attribute values to 1024 characters. If the first and last coordinates of a Polygon reference are not the same, then a final segment is implied to close it.]
Values: Positive integers given as a comma separated list of X-Y values
Href
2 | 3 | 3.2 | 4 | IE1 | M1 | N1 | O2.1
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.
Hreflang
2 | 3 | 3.2 | 4 | IE | M | N | O
Required? No
Description:
This attribute specifies the base language of the resource indicated in the HREF attribute.
Values: RFC 1766 values.
Methods
2 | 3 | 3.2 | 4 | IE | M | N | O
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 HTML 3.2 recommendation.
Values:
The set of applicable names is a function of the protocol scheme of the URL in the HREF attribute.
Name
2 | 3 | 3.2 | 4 | IE1 | M1 | N1 | O2.1
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.
Rel
2 | 3 | 3.2 | 4 | IE | M | N | O
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 | 4 | IE | M | N | O
Required? No
Description:
The REV 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.
Shape
2 | 3 | 3.2 | 4 | IE | M | N | O
Required? No
Description:
The SHAPE attribute defines the type of region to be defined for mapping in the current AREA tag. The value specified here decides the number of coordinates to list in the COORDS attribute. If the SHAPE attribute is absent the shape is assumed to be of type RECT
Values:
RECT [DEFAULT] | RECTANGLE | CIRC | CIRCLE | POLY | POLYGON
Tabindex
2 | 3 | 3.2 | 4 | IE4B1 | M | N | O
Required? No
Description:
"Tabbing" is a method of giving access/focus to an active HTML element using a standard keyboard sequence. All the active elements in a document can be cycled through using this sequence (ex: Windows TAB key.) The order of the active elements in this cycle is usually the order they occur in the document, but the TABINDEX attribute allows a different order to be established. The use of this attribute should create the following tabbing order cycle if the browser supports the attribute:
  1. Active elements using the TABINDEX attribute with positive integers are navigated first. Low values are navigated first.
  2. Active elements not specifying any TABINDEX attribute
Those elements carrying a DISABLED attribute or using negative TABINDEX values do not participate in the tabbing cycle.
Values: Positive or negative integers.
Target
2 | 3 | 3.2 | 4 | IE3A1 | M | N2 | O2.1
Required? No
Description:
This attribute specifies the named frame for the HREF hyperlink to jump to when activated.
Values: The TARGET reserved names apply.
Title
2 | 3 | 3.2 | 4 | IE4B1 | M | N | O3
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 alphanumeric string.
Type
2 | 3 | 3.2 | 4 | IE | M | N | O
Required? No
Description:
This attribute specifies the MIME type of the resource indicated in the HREF attribute.
Values: Alphanumeric MIME type
URN
2 | 3 | 3.2 | 4 | IE | M | N | O
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 HTML 3.2 recommendation.
Values: NA
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
%In-line Parent% | %Block Parent%
Exceptions: <a>
Content Model
%In-line Content%
Exceptions: <a>
Tips & Tricks Browser Peculiarities
Boring Copyright Stuff...