aspxtreme

A Element | A Object

HTML Elements/DHTML Objects


Defines the destination of a hypertext link, or designates a named location within a document.

HTML Syntax

Remarks

The A element requires either the:

  • href attribute when used as a hypertext link, to specify the link's destination URI.
  • name attribute when used as an anchor, to identify the anchor's location within a document.

Both text and images can be included within an A element used as a hyperlink.

The A element can also be used to call a JavaScript function compliant with the ECMA-262 language specification.

Members



Styles


Example

Following are several examples of using the <A> element.

Linking to an absolute path:

<a href="http://www.abakada.com">Web WorkShop.</a>

Linking to a location within a document:

<a href="chapter1.html#intro">Overview</a>

Specifying the target window or frame to load the linked resource:

<a href="demo.html" target="viewer">See Demo</a>

Using an image within an anchor:

<a href="index.html"><img src="home.gif"></a>

Specifying a named location that can be used as the destination of other links:

<h2><a name="intro">Introduction</a></h2>

Calling a JavaScript function compliant with the ECMA-262 language specification ( ex. opens a new window ):

<a href="javascript:window.open ( )"></a>
See Also

Anchors and Links



Books and more ...

Contents
HTML Elements / DOM Objects
HTML Element Attributes
CSS Attributes
DOM Object Properties
DOM-compliant Events Reference
DOM Methods Reference
DOM Collections Reference
 


Suggested Reading



Previous page Back to top Next page

Check out related books at Amazon

© 2000-2008 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support aspxtreme