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

HTML object name Attribute

HTML name attribute

HTML object Tag Reference HTML tag

Example

with the name attribute element:

name="obj1">

Try it »


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the name attribute.


Definition and Usage

The name attribute specifies The name of the element.

The name attribute is used to reference the element in JavaScript (the alternative is to reference it by using the id attribute).


Differences between HTML 4.01 and HTML5

none.


Syntax

Attribute values

Value Description
name The name of the element.

HTML object Tag Reference HTML tag