FANDOM


<a> element
Language: HTML
Namespace: http://www.w3.org/1999/xhtml
Description: anchor
Element Group: link elements
Content Model: inline
Start tag: required
End tag: required

The <a> HTML element is used primarily for hyperlinks.

SemanticsEdit

The rel and rev attributes can be used to describe the relationship with the linked document.

AttributesEdit

Core
Internationalization
Events
Link information
  • href to set the link target.
  • charset can be used to specify the character set of the target of a link.
  • type can be used to specify the MIME type of the target of a link.
  • hreflang can be used to specify the language (in the form of a language code) of the target of a link. It should only be used when href is also used.
  • rel can be used to specify the relationship of the target of the link to the current page.
  • rev can be used to specify the relationship of the current page to the target of the link.
  • accesskey can be used to associate a keyboard shortcut to the element.
  • tabindex can be used to specify where the element appears in the tab order of the page.

FutureEdit

According to the proposed specification for XHTML 2, this element is no longer needed as the HTML href attribute can be used on any element.

ExampleEdit

<a href="http://michaeljbuck.ath.cx/wiki/" title="Visit WebWiki" accesskey="w">WebWiki</a>

See alsoEdit

SpecificationsEdit

This HTML article is a stub. You can help by expanding it.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.