Language References
Designates a named location, or bookmark, within a document.
Inline |
<A NAME = sName...> |
Script |
object.name = sName ] |
sName |
String containing the name. |
The property is read/write with no default value.
This attribute names the current anchor so that it may be the destination of another link. The value of this attribute must be a unique anchor name. The scope of this name is the current document. Note that this attribute shares the same name space as the id attribute, which may be used to create an anchor at the start tag of any element ( aside from the A element ).
It is permissible to use both name and id attributes to specify an anchor; when both attributes are used on a single anchor, however, their values must be identical.
Authors should consider the following issues when deciding whether to use name or id for an anchor name:
- The name attribute allows richer anchor names, including any valid chracter entities.
- Some older browsers do not support anchors created with the id attribute.
- The id attribute can act as more than just an anchor name ( e.g., stylesheet selector, processing identifier, etc. ).
This example shows how to specify a named location in the document, to be used as a target destination:
<h2><a name="intro">Introduction</a></h2>
A
How HyperText Links Work