Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML a name property

HTML name attribute

HTML a Tag Reference HTML tag

Example

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

Chapter 4

Try it »


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

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

Attribute values

Value Description
anchor_name The name of the anchor.

HTML a Tag Reference HTML tag