A

Description

Mark the start and/or destination of a hypertext link. Anchor elements are defined by the <A> element. The attribute "href=" or "NAME=" is necessary required.

Syntax

<A
HREF=url
NAME=name
TITLE=text content
REL="home"
REV="home"
URN=urn
METHODS=http-method
TARGET=window name
ACCESSKEY=key
LANGUAGE=JAVASCRIPT | JSCRIPT | VBSCRIPT | VBS
DATAFLD=colname
DATASRC=Data Source
LANG=language
CLASS=Style Sheet class name
ID=value
STYLE=styling
TABINDEX=n pixels
event = script
>

Parameter

Description

HREF

Destination URL or anchor point. The text between the anchor elements becomes a hypertext link. If readers select the link, they would move to the document or location specified by the value of the attribute.

NAME

The value of the NAME attribute is an identifier for the anchor. If present, the NAME attribute allows the anchor to be the target of a link (another <A HREF...> element).

TITLE

The TITLE attribute is for advisory information (unless used with a mailto: attribute). The Title attribute should provide the title of the document whose address is given by the HREF attribute. The contents of the title attribute will be displayed in a tooltip during the mouse moves on the link. Internet Explorer 4.0 (and above) is the only browser to implement this.

REL

Gives the relationship(s) described by the hypertext link from the anchor to the target. The value is a comma-separated list of relationship values. The values and their semantics will be registered by the HTML registration authority. The default relationship if none other is given is void. The REL attribute is only used when the href= attribute is present.

REV

Same as the REL attribute, but the semantics of the link type 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.

URN

The URN attribute specifies a Uniform Resource Name (URN) for a target document. The format of URNs is still under discussion.

METHODS

METHODS attributes of anchors and links provide information about the functions that the user may perform on an object. These are more accurately given by the HTTP protocol when it is used, but it may, for similar reasons as for the TITLE attribute, be useful to include the information in advance in the link. For example, the HTML user agent may choose a different rendering as a function of the methods allowed; for example, something that is searchable may get a different icon.

TARGET

Window or frame at which to target the contents. If no frame or window exists that matches the specified target, a new window is opened for the specified link. If no target is specified, the default is "_self" for a link within the same site or "_top" if the site is external. Special target values are:
_blank Specifies to load the link into a new unnamed window.
_parent Specifies to load the link into the immediate parent of the document the link is in.
_self Specifies to load the link into the same window the link was clicked in.
_top Specifies to load the link into the full body of the current window.

ACCESSKEY

Accelerator for the element. Pressing ALT-key selects this element in the user's browser.

LANGUAGE

Specifies the language the current script is written in and invokes the proper scripting engine. The default value is JAVASCRIPT.
* JAVASCRIPT, JSCRIPT The script is written in JScript.
* VBS, VBSCRIPT The script is written in VBScript.

DATAFLD

Column name from the data source object that supplies the bound data.

DATASRC

ID of the data source object that supplies the data that is bound to this element.

LANG

Specifies which language to use in ISO standard language abbreviation form.

CLASS

Class of the tag being defined. This is used to associate a subclassed style sheet with the tag.

ID

SGML identifier used as the target for hypertext links or for naming particular elements in associated style sheets. Valid ID values must begin with a letter. The underscore character, "_", may be used in the ID name. The ID should be unique throughout the scope of the document. If more than one object with the same identifier exists in a document, a collection of those named items is created that can only be referenced by ordinal position.

STYLE

Inline style sheet for the tag.

TABINDEX

Sets the tab order position for the object.

event

Can be one or more of these events:
onblur ;
onclick ;
onDblClick ;
ondragstart ;
onfocus ;
onhelp ;
onkeydown ;
onkeypress ;
onkeyup ;
onmousedown ;
onmousemove ;
onmouseout ;
onmouseover ;
onmouseup ;
onselectstart

 

Example

<A href="http://www.sothink.com">link to Sothink.com.</A>
<A href="home.htm">this link points to a file called home.htm in the same directory as this page.</A>
<A href="sample.htm" TARGET="main">Click here to load the link into "main" window.</A>
<A href="http://www.sothink.com"><img src="images/logo.gif">this link contains an image</A>
<A href="javascript:window.open()">this link opens a new window using the open method in javascript</A>

Remarks

Text and/or images may be within an anchor. To represent images that are anchors, a border in the visited or not visited color is displayed. Both the start and end tags are required.