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
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access