Hyperlink
[A Href]

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



   Quick Statistics   
End Tag:
   Required
Standards Details:
In all HTML 4.x/XHTML DTDs
XHTML Modules:
Hypertext
CSS 'display' Type:
"inline"
CSS Mapping:
a:link, a:visited, a:active
Default Rendering:
Underlined content - usually blue for unvisited content, purple for visited.
Official Docs: HTML 4.x, XHTML 1.1
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] [X1|X1.1] [IE3|M|N4B3|O3.5]
%Accessibility%
[2|3|3.2|4] [X1|X1.1] [IE4B1|M|N6|O3]
%Events%
[2|3|3.2|4] [X1|X1.1] [IE3|M|N2|O3]
%Language%
[2|3|3.2|4] [X1|X1.1] [IE4|M|N|O]
%Data%
[2|3|3.2|4] [X1|X1.1] [IE4|M|N|O]
%Editing%
[2|3|3.2|4] [X1|X1.1] [IE5.5|M|N|O]

Specific Attributes
Accesskey
[2|3|3.2|4] [X1|X1.1] [IE4B1|M|N6B2|O7]
Standards Details: In all HTML 4.x/XHTML DTDs
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: CDATA. [A single, case-insensitive character from a browser's character set.]
Charset
[2|3|3.2|4] [X1|X1.1] [IE|M|N|O7]
Standards Details: In all HTML 4.x/XHTML DTDs
Required? No
Description:
This attribute indicates the character encoding of the destination resource of the hyperlink.
Values: CDATA. [A recognized RFC 2045 language character set string. Default is ISO-8859-1.]
Coords
[2|3|3.2|4] [X1|X1.1] [IE|M|N6|O7]
Standards Details: In all HTML 4.x/XHTML DTDs
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: CDATA. [Positive integers given as a comma separated list of X-Y values.]
Disabled
[2|3|3.2|4] [X1|X1.1] [IE5|M|N|O7]
Standards Details: NA
Required? No
Description:
This is a stand-alone attribute which indicates the element is initially non-functional.
Values: NA (HTML); disabled (XHTML)
Href
[2|3|3.2|4] [X1|X1.1] [IE1|M1|N1|O2.1]
Standards Details: In all HTML 4.x/XHTML DTDs
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: CDATA. [Either an absolute or relative URL. All URLs should be URL encoded where required.]
Hreflang
[2|3|3.2|4] [X1|X1.1] [IE|M|N6.1|O]
Standards Details: In all HTML 4.x/XHTML DTDs
Required? No
Description:
This attribute specifies the base language of the resource indicated in the HREF attribute.
Values: Any RFC 1766 value. [Must begin with a letter ([A-Za-z]), followed by any number of characters in [A-Za-z0-9-_:.]
Methods
[2|3|3.2|4] [X1|X1.1] [IE4|M|N|O]
Standards Details: NA
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] [X1|X1.1] [IE1|M1|N1|O2.1]
Standards Details: In all HTML 4.x/XHTML 1.0 DTDs. Dropped in XHTML 1.1 in favor of ID attribute.
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 element. (Note: HTML 4 states that if ID and NAME are both used in a given A element, they should have the exact same value since they share the same domain value space.)
Values: CDATA
Rel
[2|3|3.2|4] [X1|X1.1] [IE3|M|N6.1|O6]
Standards Details: In all HTML 4.x/XHTML DTDs
Required? No
Description:
The REL attribute is meant to give the relationship(s) described by the hyperlink.
Values: CDATA. [A whitespace separated list of relationship names.]
Rev
[2|3|3.2|4] [X1|X1.1] [IE|M3|N6.1|O]
Standards Details: In all HTML 4.x/XHTML DTDs
Required? No
Description:
The REV attribute is 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: CDATA. [A whitespace separated list of relationship names.]
SDAPref
[2|3|3.2|4] [X1|X1.1] [IE|M|N|O]
Standards Details: NA
Required? No
Description:
This is an SGML Document Access (SDA) attribute. SDA attributes are designed to transform HTML (and other SGML-based documents) to the ICADD DTD - which is used in creating accessible documents for users with visual disabilities (rendering in Braille, large print, speech synthesis, etc.) The attribute value specifies content to be added BEFORE the original element content (in this case the string "<Anchor: #AttList >") when the SDA document is rendered (SDA also allows attributes and values from the original element to be used in the new SDA element where necessary.) #Attlist lists out all of the attribute="value" pairs from the original code.
Value: "<Anchor: #AttList >"
Shape
[2|3|3.2|4] [X1|X1.1] [IE|M|N6|O7]
Standards Details: In all HTML 4.x/XHTML DTDs
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
Suppress
[2|3|3.2|4] [X1|X1.1] [IE|M|N4-4.x|O]
Standards Details: NA
Required? No
Description:
This attribute specifies that the dotted focus rectangle for this element should be suppressed when the hyperlink has keyboard focus.
Values: FALSE [DEFAULT] | TRUE
Tabindex
[2|3|3.2|4] [X1|X1.1] [IE4B1|M|N6|O7]
Standards Details: In all HTML 4.x/XHTML DTDs
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] [X1|X1.1] [IE3A1|M|N2|O2.1]
Standards Details: Transitional/Frameset HTML 4.x/XHTML 1.0 DTDs only. Dropped in XHTML 1.1.
Required? No
Description:
This attribute specifies the named frame for the HREF hyperlink to jump to when activated.
Values: CDATA. [The TARGET reserved names apply.]
Title
[2|3|3.2|4] [X1|X1.1] [IE4B1|M|N6B2|O3]
Standards Details: In all HTML 4.x/XHTML DTDs
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: CDATA
Type
[2|3|3.2|4] [X1|X1.1] [IE|M|N6.1|O]
Standards Details: In all HTML 4.x/XHTML DTDs
Required? No
Description:
This attribute specifies the MIME type of the resource indicated in the HREF attribute.
Values: CDATA. [Alphanumeric MIME type]
URN
[2|3|3.2|4] [X1|X1.1] [IE4|M|N|O]
Standards Details: NA
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>
Image map/Shaped hyperlink list in an OBJECT element:
<object  type="image/gif" data="http://www.foo.com/bigimage.gif" height="50" width="100">
<b>Menu:</b><br />
<a  href="http://www.foo.com/link1.html" shape="RECT" coords="0, 0, 50, 50">Link text 1</a><br />
<a  href="http://www.foo.com/link2.html" shape="RECT" coords="50, 0, 100, 50">Link text 2</a><br />
</object>
Parent Model
%In-line Parent% | %Block Parent%
Exceptions: <a>
Content Model
%In-line Content%
Exceptions: <a>
Tips & Tricks Browser Peculiarities
Boring Copyright Stuff...