Name

NAME — NN all IE all HTML all

Synopsis

NAME=”elementIdentifier"

Required for anchors

The traditional way to signify an anchor position within a document. Other link elements can refer to the anchor by setting their HREF attributes to a URL ending in a pound sign (#) followed by the identifier. Omitting the NAME (and ID) attribute for the A element prevents the element from being used as an anchor position. This attribute is interchangeable with the ID attribute in recent browsers. If the NAME and HREF attribute are set in the element, the element is considered both an anchor and a link.

Example

<A NAME="sect3">Section III</A>

Value

Case-sensitive identifier.

Default

None.

Object Model Reference

IE

[window.]document.links[i].name

[window.]document.anchors[i].name

[window.]document.all.elementID.name

NN

[window.]document.links[i].name

[window.]document.anchors[i].name

Get Dynamic HTML: The Definitive Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.