HTML DOM Attribute name Property

Get the name of an attribute

Definition and Usage

The name property returns the name of an attribute.

The name property is read-only.

Syntax

attribute.name

Return Value

Type Description
A stringThe name of the attribute.

Browser Support

attribute.name is a DOM Level 1 (1998) feature.

It is fully supported in all browsers:

Chrome IE Edge Firefox Safari Opera
Yes 9-11 Yes Yes Yes Yes