HTML name attribute
Example
The name property is used to specify the name of an anchor:
Try it »
Browser support





All major browsers support the name attribute
Definition and Usage
HTML5 no longer supports the tag's name property. You can use the id property instead of the name property.
The name property is used to specify the name of an anchor.
The name property can create bookmarks within a (large) document.
The tag must contain either an href or a name property.
Tip: In XHTML, the tag's name property is deprecated and will be removed in the future. You can use the id property instead.
Syntax
| Value | Description |
|---|---|
| anchor_name | The name of the anchor. |
HTML