My favorites | Sign in
Project Logo
             
Search
for
Updated Apr 03, 2009 by pilgrim
Labels: about-html, is-html-element, from-w3c
AElement  
The HTML <a> element represents a hyperlink or placeholder.

You are here: Home > HTML Reference > Elements > a element

EspaƱol

If the <a> element has an href attribute, then it represents a hyperlink.

If the <a> element has a name attribute, it serves as an anchor, so that a hyperlink can lead to a specific place in a html page.

The target attribute specifies if the link will open in the same window, or a new one. If frames are used, those can be the target too.

SVG also defines its own <a> element which has a similar purpose.

Usage

<a href="/">home</a>
<a name="navbar"></a>
<a href="#navbar">navigation</a>
<a href="example.com" target="_blank">somewhere</a>

Attributes

Common attributes:

Other attributes:

Browser compatibility

Compatibility table legend

Test IE8 IE7 IE6 FF3 FF2 Saf3 Op9 Chrome
appears in DOM Y Y Y Y Y Y Y Y
applies style Y N N Y Y N Y Y

Further reading



Sign in to add a comment
Hosted by Google Code