asp.net.ph

Skip Navigation Links

NAME Attribute | name Property

Language References


Designates a named location, or bookmark, within a document.

Syntax


Inline <A NAME = sName...>
Script object.name = sName ]

Possible Values


sName String containing the name.

The property is read/write with no default value.

Remarks

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. ).

Example

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>
Applies To

A

See Also

How HyperText Links Work



© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

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