Easy Tutorial
❮ Dom Obj Tabledata Met Element Hasattribute ❯

HTML DOM tagName Property

Element Object

Example

Get the tag name of an element:

Output result:


Definition and Usage

The tagName property returns the tag name of an element.

In HTML, the value of the tagName property is in uppercase.


Browser Support

All major browsers support the tagName property.


Syntax

Technical Details

Return Value: String, representing the tag name of the element
DOM Version Core Level 1 Element Object
--- ---

Element Object

❮ Dom Obj Tabledata Met Element Hasattribute ❯