HTML - <A> (Anchor)

This element indicates the portion of the document that is a hyperlink or the named target destination for a hyperlink.



CHARSET="character code for language of linked resource"
CLASS="class name"
COORDS="comma-separated list of numbers"
HREFLANG="language code"
ID="unique alphanumeric identifier"
NAME="name of target location"
REL="comma-separated list of relationship values"
REV="comma-separated list of relationship values"
STYLE="style information"
TARGET="_blank | frame-name | _parent | _self | _top"
TITLE="advisory text"
TYPE="content type of linked data"

Linked content



ACCESSKEY This attribute specifies a keyboard navigation acceletor for the element. Pressing ALT or a similar key (depending on the browser and operating system) in association with the specified key selects the anchor element correlated with that key.
CHARSET This attribute defines the character encoding of the linked resource. The value is a space- and/or comma-delimited list of character sets. The default value is ISO-8859-1
CLASS This attribute is set to indicate the class or classes that a particular element belongs to. A class name is used by a style sheet to associate style rules to multiple elements at once.
COORDS For use with object shapes, this attribute uses a comma-separated list of numbers to define the coordinates of the object on the page.
HREF This is the single require attribute for anchors defining a hypertext source link. It indicates the link target, either a URL or a URL fragment, that is a name preceded by a hash mark(#), which specifies an internal target location within the current document. URLs are not restricted to Web (http)-based documents. URLs may use any protocol supported by the browser. For example, file ftp and mailto work in most user agents.
HREFLANG This attribute is used to indicate the language of the linked resource.
ID This attribute specifies a unique alphanumeric identifier to be associated with an element. Naming an element is important to being able to access it with a style sheet, a link, or a scripting language. Names should be unique to a document and should be meaningful.
NAME This attribute is required in an anchor defining a target location within a page. A value for NAME is similar to a value for the ID core attribute and should be alphanumeric identifier unique to the document.
REL For anchors containing the HREF attribute, this attribute specifies the relationship of the target object to the link object. The value is a comma-separated list of relationship values. The values and their semantics wil be registered by some authority that may have meaning to the document anchor. The default relationship, if no other is given, is void. The REL attribute should be used only when the HREF attribute is present.
REV This attribute specifies a reverse link, the inverse relationship of the REL attribute. It is useful for indicating where an object came from, such as the author or a document.
SHAPE This attribute is used to define a selectable region for hypertext source links associated with figure to create an image map. The values for the attribute are CIRCLE, DEFAULT, POLYGON, and RECT. The format of the COORDS attribute depends on the value of SHAPE. For CIRCLE, the value is x,y,r where x and y are the pixel coordinates for the center of the circle and r is the radius value in pixels. For RECT, the COORDS attribute should be x,y,w,h. The x,y values defines the upper left-hand corner of the rectangle, while w and h define the width and height, respectively. A value of POLYGON for SHAPE requires point in the polygon, with successive points being joined by straight lines and the last point joined to the first. The value DEFAULT for SHAPE defines that the entire enclosed area, typically an image, be used.
STYLE This attribute specifies an inline style associated with the element. The style information is used to determine the rendering of the affected element.
TABINDEX This attribute uses a number to identify the object's position in the tabbing order for keyboard navigation using the TAB key.
TARGET This attribute specifies the target window for a hypertext source link referencing frames. The information linked to will be displayed in the named window. Frames must be named to be targeted. There are special name values, including _blank, which indicates a new window; _parent, which indicates the parent frame set containing the source link; _self, which indicates the frame containing the source link; and _top, which indicates the full browser window.
TITLE This attribute supplies advisory text for the element that may be rendered as a tool tip when the mouse is over the element. A title may also simply provide information that alerts future document maintainers to the meaning of the element and its enclosed content.
TYPE This attribute specifies the media type in the form of a MIME type of the link target. Generally, this is provided strictly as advisory information; however, in the future a browser may add a small icon for multimedia types. For example, a browser might add a small speaker icon when TYPE is set to audio/wav.

Event Handlers

onblur Occurs when an element loses focus, meaning that the user has moved focus to another element, typically either by clicking the mouse on it or tabbing to it.
onclick Indicates that the element has been clicked.
ondblclick Indicates that the element has been double-clicked.
onfocus The focus event describes when an element has received focus, namely, it has been selected for manipulation or data entry.
onkeydown Indicates that a key is being pressed down with focus on the element.
onkeypress Describes the event of a key being pressed and released with focus on the element.
onkeyup Indicates that s key is being released with focus on the element.
onmousedown Indicates the press of a mouse button with focus on the element.
onmousemove Indicates that the mouse has moved while over the element.
onmouseout Indicates that the mouse has moved away from an element.
onmouseover Indicates that the mouse has moved over an element.
onmouseup Indicates the release of a mouse button with focus on the element.


<A HREF="">Click here to go to triconsole</A>
<A NAME="jump">Jump Target</A>
<A HREF="#jump">Local jump within document directly to anchor named "jump"</A>
<A HREF="">
         Remote jump within document directly to anchor named 'jump'
Write a review
(Your email that entered here will not show anywhere on website and will use only reference when someone reply your post)
  I want to receive a copy of email on this post (your email is needed)