Version-//W3C//DTD HTML 4.01//EN
ElementA
Purposeanchor for hypertext link
DescriptionA is the element used to create hypertext links. It is one of the most popularly-used elements. You can create a hypertext link from one document to another by using the href attribute. Note that A cannot contain another A.
Start tagRequired <A>
Attributes
NameTypeDefaultComment
accesskey CDATA #IMPLIEDa single character from ISO10646 (see RFC1815); accessibility key character
charset CDATA #IMPLIEDa character encoding; char encoding of linked resource
class CDATA #IMPLIEDspace-separated list of classes
coords CDATA #IMPLIEDcomma-separated list of lengths; for use with client-side image maps
dir( ltr | rtl )#IMPLIEDdirection for weak/neutral text
href CDATA #IMPLIEDUniform Resource Identifier as per RFC2396; a Uniform Resource Locator (URL) is a URI; URI for linked resource
hreflang NAME #IMPLIEDlanguage code as RFC1766; language code
idID#IMPLIEDdocument-wide unique id
lang NAME #IMPLIEDlanguage code as RFC1766; language code
name CDATA #IMPLIEDnamed link end
onblur CDATA #IMPLIEDscript expression; the element lost the focus
onclick CDATA #IMPLIEDscript expression; a pointer button was clicked
ondblclick CDATA #IMPLIEDscript expression; a pointer button was double clicked
onfocus CDATA #IMPLIEDscript expression; the element got the focus
onkeydown CDATA #IMPLIEDscript expression; a key was pressed down
onkeypress CDATA #IMPLIEDscript expression; a key was pressed and released
onkeyup CDATA #IMPLIEDscript expression; a key was released
onmousedown CDATA #IMPLIEDscript expression; a pointer button was pressed down
onmousemove CDATA #IMPLIEDscript expression; a pointer was moved within
onmouseout CDATA #IMPLIEDscript expression; a pointer was moved away
onmouseover CDATA #IMPLIEDscript expression; a pointer was moved onto
onmouseup CDATA #IMPLIEDscript expression; a pointer button was released
rel CDATA #IMPLIEDspace-separated list of link types; forward link types
rev CDATA #IMPLIEDspace-separated list of link types; reverse link types
shape( rect | circle | poly | default )rectshape; for use with client-side image maps
style CDATA #IMPLIEDstyle sheet data; associated style info
tabindex NUMBER #IMPLIEDposition in tabbing order
title CDATA #IMPLIEDtext; advisory title
type CDATA #IMPLIEDmedia type; advisory content type
Content( #PCDATA | TT | I | B | BIG | SMALL | EM | STRONG | DFN | CODE | SAMP | KBD | VAR | CITE | ABBR | ACRONYM | A | IMG | OBJECT | BR | SCRIPT | MAP | Q | SUB | SUP | SPAN | BDO | INPUT | SELECT | TEXTAREA | LABEL | BUTTON )* -( A )
End tagRequired </A>
Referenced in A ABBR ACRONYM ADDRESS B BDO BIG BUTTON CAPTION CITE CODE DD DEL DFN DIV DT EM FIELDSET H1 H2 H3 H4 H5 H6 I INS KBD LABEL LEGEND LI OBJECT P PRE Q SAMP SMALL SPAN STRONG SUB SUP TD TH TT VAR
Example
SourceAppearance
<P>Link to another document:
<A Href="http://www.w3.org/">W3C</A>

<P>Title attribute set:
<A Href="http://www.w3.org/" Title="The World Wide Web Consortium">W3C</A>

<P>An image in the "hotspot":
<A Href="http://www.december.com/html/"><IMG Src = "http://www.december.com/html/images/icon.gif" Alt="The HTML Station"></A>

<P>Naming an anchor:
<A Href="http://www.w3.org/" Name="reference-to-w3c">W3C</A>

<P>Link to named anchor in this document:
Learn about it <A Href="#reference-to-w3c">at the W3C</A>

<P>Link to a named anchor in another document:
You can learn about <A Href = "http://www.december.com/john/faq.html#lastname"> my last name on my FAQ</A>.

Link to another document: W3C

Title attribute set: W3C

An image in the "hotspot": The HTML Station

Naming an anchor: W3C

Link to named anchor in this document: Learn about it at the W3C

Link to a named anchor in another document: You can learn about my last name on my FAQ.

search Search · star Market
2023-06-19 · John December · Terms © johndecember.com