HTML <a> nameAttribute

HTML a 标签参考手册HTML <a> Tag

Examples

The name attribute is used to specify the name of an anchor:

<a name="C4">Chapter 4</a>

Try it Yourself »

Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the name attribute.


Definition and Usage

HTML5 no longer supports the name attribute of the <a> tag. The id attribute can be used instead of the name attribute.

The name attribute is used to specify the name of an anchor.

The name attribute can create bookmarks within (large) documents.

The href or name attribute must be provided in the <a> tag.

Tip:In XHTML, the name attribute of the <a> tag is deprecated and will be removed in the future. The id attribute can be used instead.


Syntax

<a name="value">

Attribute Values

Value Description
anchor_name The name of the anchor.


HTML a 标签参考手册HTML <a> Tag

Other Extensions