<A> | NN all IE all HTML all
<A>...</A> | End Tag: Required
The A element is the rare element that can be an anchor and/or a link, depending on the presence of the NAME and/or HREF attributes. As an anchor, the element defines a named location in a document to which any URL can reference by appending a hashmark and the anchor name to the document's URI (http://www.megacorp.com/contents#a-c). Names are identifiers assigned to the NAME attribute (or in newer browsers, the ID attribute). Content defined solely as an anchor is not (by default) visually differentiated from surrounding BODY content. By assigning a URI to the HREF attribute, the element becomes the source of a hypertext link. Activating the link generally navigates to the URI assigned to the HREF attribute (or it may load other media into a plugin without changing the page). Links typically have a distinctive appearance in the browser, such as an underline beneath text (or border around an object) and a color other than the current content color. Separate colors can be assigned to links for three states: an unvisited link, a link being activated by the user, and a previously visited link (the linked document is currently in the browser cache). An A element can be both an anchor and a link if, in the least, both the NAME (or ID) and HREF attributes have values assigned to them.
Example
    <A NAME="anchor3">Just an anchor named "anchor3."</A>
    <A HREF="#anchor3">A link to navigate to "anchor3" in the same
     document.</A>
    <A NAME="anchor3" HREF="http://www.megacorp.com/index.html">
    Go from here (anchor 3) to home page.</A>
Object Model Reference
NN | [window.]document.links[i] [window.]document.anchors[i]
IE | [window.]document.links[i] [window.]document.anchors[i] [window.]document.all.elementID

ACCESSKEY | NN n/a IE 4 HTML 4
ACCESSKEY="character" | Optional
A single character key that follows the link. The browser and operating system determine if the user must press a modifier key (e.g., Ctrl, Alt, or Command) with the access key to activate the link. In IE 4/Windows, the Alt key is required and the key is not case sensitive. This attribute does not work in IE 4/Mac.
Example
    <A HREF="http://www.megacorp.com/toc.html" ACCESSKEY="t">Table of Contents</A>
Value Single character of the document set.
Default | None.
Object Model Reference
IE | [window.]document.links[i].accessKey [window.]document.anchors[i].accessKey [window.]document.all.elementID.accessKey

CHARSET | NN n/a IE n/a HTML 4
CHARSET="characterSet" | Optional
Character encoding of the content at the other end of the link.
Example
    <A CHARSET="csISO5427Cyrillic" HREF="moscow.html">Visit Moscow</A>
Value Case-insensitive alias from the character set registry (ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets).
Default | Determined by browser.

COORDS | NN n/a IE n/a HTML 4
COORDS="coord1, ... coordN" | Optional
When a link surrounds an image, this attribute defines the coordinate points (relative to the top-left corner of the element) associated with an area map.
Example
    <A HREF="#bottom" SHAPE="rect" COORDS="30, 30, 60, 45">
        <IMG SRC="nav.jpg" HEIGHT="50" WIDTH="90" BORDER="0">
    </A>
Value Each coordinate is a length value, but the number of coordinates and their order depend on the shape specified by the SHAPE attribute, which may optionally be associated with the element. For SHAPE="rect", there are four coordinates (left, top, right, bottom); for SHAPE="circle", there are three coordinates (center-x, center-y, radius); for SHAPE="poly", there are two coordinate values for each point that defines the shape of the polygon (x1, y1, x2, y2, x3, y3,...xN, yN).
Default | None.

DATAFLD | NN n/a IE 4 HTML n/a
DATAFLD="columnName" | Optional
Used with IE 4 data binding to associate a remote data source column name in lieu of an HREF attribute for a link. The data source column must contain a valid URI (relative or absolute). A DATASRC attribute must also be set for the element.
Example
    <A DATASRC="#DBSRC3" DATAFLD="newsURL">Late-Breaking News</A>
Value Case-sensitive identifier.
Default | None.
Object Model Reference
IE | [window.]document.links[i].dataFld [window.]document.all.elementID.dataFld

DATASRC | NN n/a IE 4 HTML n/a
DATASRC="dataSourceName" | Optional
Used with IE 4 data binding to specify the name of the remote ODBC data source (such as an Oracle or SQL Server database) to be associated with the element. Content from the data source is specified via the DATAFLD attribute.
Example
    <A DATASRC="#DBSRC3" DATAFLD="newsURL">Late-Breaking News</A>
Value Case-sensitive identifier.
Default | None.
Object Model Reference
IE | [window.]document.links[i].dataSrc [window.]document.all.elementID.dataSrc

HREF | NN all IE all HTML all
HREF="URI" | Required for links
The URI of the destination of a link. In browsers, when the URI is an HTML document, the document is loaded into the current (default) or other window target (as defined by the TARGET attribute). For some other file types, the browser may load the destination content into a plugin or save the destination file on the client machine. In the absence of the HREF attribute, the element does not distinguish itself in a browser as a clickable link and may instead be only an anchor (if the NAME or ID attribute is set).
Example
    <A HREF="part1/chap3.html">Chapter 3</A>
Value Any valid URI, including complete and relative URLs, anchors on the same page (anchor names prefaced with the # symbol), and the javascript: pseudo-URL in scriptable browsers to trigger a script statement rather than navigate to a destination.
Default | None.
Object Model Reference
IE | [window.]document.links[i].href [window.]document.all.elementID.href
NN | [window.]document.links[i].href
In both browsers, other link object properties allow for the extraction of components of the URL, such as protocol and hostname. See the Link object in .

HREFLANG | NN n/a IE n/a HTML 4
HREFLANG="languageCode" | Optional
The language code of the content at the destination of a link. Requires that the HREF attribute also be set. This attribute is primarily an advisory attribute to help a browser prepare itself for a new language set if the browser is so enabled.
Example
    <A HREFLANG="HI" HREF="hindi/Chap3.html>Chapter 3 (in Hindi)</A>
Value Case-insensitive language code.
Default | Browser default.

ID | NN 3 IE 3 HTML 4
ID="elementIdentifier" | Optional
A unique identifier that distinguishes this element from all the rest in the document. Can be used to associate a single element with a style rule naming this attribute value as an ID selector. Browsers typically allow the ID attribute to be used as a substitute for the NAME attribute to make the element an anchor. In this case, one ID attribute can serve double duty as a style sheet rule selector and anchor name. An A element can have an ID assigned for uniqueness as well as a class for inclusion within a group.
Example
    <A ID="section3">Section 3</A>
Value Case-sensitive identifier.
Default | None.
Object Model Reference
IE | [window.]document.links[i].id [window.]document.anchors[i].id [window.]document.all.elementID.id
NN | [window.]document.anchors[i].name

METHODS | NN n/a IE 4 HTML n/a
METHODS="http-method" | Optional
An advisory attribute about the functionality of the destination of a link. A browser could use this information to display special colors or images for the element content based on what the destination will do for the user.
Example
    <A HREF="http://www.megacorp.com/cgi-bin/search?chap3" METHODS="GET">
    Chapter 3</A>
Value Comma-delimited list of one or more HTTP methods.
Default | None.
Object Model Reference
IE | [window.]document.links[i].Methods [window.]document.all.elementID.Methods

NAME | NN all IE all HTML all
NAME="elementIdentifier" | Required for anchors
The traditional way to signify an anchor position within a document. Other link elements can refer to the anchor by setting their HREF attributes to a URL ending in a pound sign (#) followed by the identifier. Omitting the NAME (and ID) attribute for the A element prevents the element from being used as an anchor position. This attribute is interchangeable with the ID attribute in recent browsers. If the NAME and HREF attribute are set in the element, the element is considered both an anchor and a link.
Example
    <A NAME="sect3">Section III</A>
Value Case-sensitive identifier.
Default | None.
Object Model Reference
IE | [window.]document.links[i].name [window.]document.anchors[i].name [window.]document.all.elementID.name
NN | [window.]document.links[i].name [window.]document.anchors[i].name

REL | NN n/a IE 3 HTML 4
REL="linkTypes" | Optional
Defines the relationship between the current element and the destination of the link. Also known as a forward link, not to be confused in any way with the destination document whose address is defined by the HREF attribute. The HTML 4.0 recommendation defines several link types; it is up to the browser to determine how to employ the value. This attribute has meaning in IE 4 primarily for the LINK element, although there is significant room for future application for tasks such as assigning an A element (acting as a link) to a button in a static navigation bar pointing to the next or previous document in a series. The element must include an HREF attribute for the REL attribute to be applied.
Example
    <A REL="next chapter" HREF="chapter3.html">Chapter 3</A>
Value Case-insensitive, space-delimited list of HTML 4.0 standard link types applicable to the element. Sanctioned link types are:
alternate | contents | index | start
appendix | copyright | next | stylesheet
bookmark | glossary | prev | subsection
chapter | help | section |
In addition, IE 3 defined a fixed set of four values: same | next | parent | previous.
Default | None.
Object Model Reference
IE | [window.]document.links[i].rel [window.]document.all.elementID.rel

REV | NN n/a IE 3 HTML 4
REV="linkTypes" | Optional
A reverse link relationship. Like the REL attribute, the REV attribute's capabilities are defined by the browser, particularly with regard to how the browser interprets and renders the various link types available in the HTML 4.0 specification. Given two documents (A and B) containing links that point to each other, the REV value of B is designed to express the same relationship between the two documents as denoted by the REL attribute in A. There is not yet much application of either the REL or REV attributes of the A element in IE 4.
Example
    <A REV="previous chapter" HREF="chapter2.html">Chapter 2</A>
Value Case-insensitive, space-delimited list of HTML 4.0 standard link types applicable to the element. See the REL attribute for sanctioned link types.
Default | None.
Object Model Reference
IE | [window.]document.links[i].rev [window.]document.all.elementID.rev

SHAPE | NN n/a IE n/a HTML 4
SHAPE="shape" | Optional
Defines the shape of a server-side image map area whose coordinates are specified with the COORDS attribute.
Example
    <A HREF="#bottom" SHAPE="rect" COORDS="30, 30, 60, 45">
        <IMG SRC="nav.jpg" HEIGHT="50" WIDTH="90" BORDER="0">
    </A>
Value Case-insensitive shape constant: default | rect | circle | poly.
Default | None.

TABINDEX | NN n/a IE 4 HTML 4
TABINDEX=integer | Optional
A number that indicates the sequence of this element within the tabbing order of all focusable elements in the document. Tabbing order follows a strict set of rules. Elements that have values other than zero assigned to their TABINDEX attributes are first in line when a user starts tabbing in a page. Focus starts with the element with the lowest TABINDEX value and proceeds in order to the highest value, regardless of physical location on the page or in the document. If two elements have the same TABINDEX values, the element that comes earlier in the document receives focus first. Next come all elements that either don't support the TABINDEX attribute or have the value set to zero. These elements receive focus in the order in which they appear in the document. Because an A element cannot be disabled, it always receives focus in turn, except for special handling in IE 4. Typically, an A element wired as a link can be triggered with a press of the spacebar once the element has focus. Note that the Macintosh user interface does not provide for giving focus to elements other than text input fields. Links and anchors cannot be tabbed to with the Mac version of IE 4.
Example
    <A HREF="chapter3.html" TABINDEX=3>Chapter 3</A>
Value Any integer from through 32767. In IE 4, setting the TABINDEX to -1 causes the element to be skipped in tabbing order altogether.
Default | None.
Object Model Reference
IE | [window.]document.links[i].tabIndex

TARGET | NN all IE all HTML all
TARGET="windowOrFrameName" | Optional
If the destination document is to be loaded into a window or frame other than the current window or frame, you can specify where the destination document should load by assigning a window or frame name to the TARGET attribute. Target frame names must be assigned to frames and windows as identifiers. Assign names to frames via the NAME attribute of the FRAME element; assign names to new windows via the second parameter of the window.open() scripting method. If you omit this attribute, the destination document replaces the document containing the link. An identifier other than one belonging to an existing frame or window opens a new window for the destination document. This attribute is applicable only when a value is assigned to the HREF attribute of the element. A link element can have only one destination document and one target. If you want a link to change the content of multiple frames, you can use an A element's onClick event handler or a javascript: pseudo-URL to fire a script that loads multiple documents. Set the location.href property of each frame to a desired URL.
Example
    <A TARGET="display" HREF="chap3.html#sec2">Section 3.2</A>
    <A TARGET="_top" HREF="index.html">Start Over</A>
Value Case-sensitive identifier when the frame or window name has been assigned via the target element's NAME attribute. Four reserved target names act as constants:
_blank | Browser creates a new window for the destination document.
_parent | Destination document replaces the current frame's framesetting document (if one exists; otherwise, it is treated as _self).
_self | Destination document replaces the current document in its window or frame.
_top | Destination document is to occupy the entire browser window, replacing any and all framesets that may be loaded (also treated as _self if there are no framesets defined in the window).
Default | _self
Object Model Reference
IE | [window.]document.links[i].target
NN | [window.]document.links[i].target

TYPE | NN n/a IE n/a HTML 4
TYPE="MIMEType" | Optional
An advisory about the content type of the destination document or resource. A browser might use this information to assist in preparing support for a resource requiring a multimedia player or plugin.
Example
    <A TYPE="video/mpeg" HREF="ski4.mpeg">View Devil's Ghost slope</A>
Value Case-insensitive MIME type. A catalog of registered MIME types is available from ftp://ftp.isi.edu/in-notes/iana/assignments/media-types/.
Default | None.

URN | NN n/a IE 4 HTML n/a
URN="URN" | Optional
A Uniform Resource Name version of the destination document specified in the HREF attribute. This attribute is intended to offer support in the future for the URN format of URI, an evolving recommendation under discussion at the IETF (see RFC 2141). Although supported in IE 4, this attribute does not take the place of the HREF attribute.
Example
    <A URN="urn:foo:bar3" HREF="chapter3.html">Chapter 3</A>
Value A valid URN in the form of "urn:NamespaceID:NamespaceSpecificString".
Default | None.
Object Model Reference
IE | [window.]document.links[i].urn