HTML DOM Element nodeName
HTML DOM Element nodeName Property
The nodeName property is a read-only property and it returns the name of a node. Some of the most common names are:-
- #text for text nodes
- #comment for comment nodes
- #document for document nodes
- The tagname in uppercase for element nodes
- The attribute name for attribute nodes
Syntax:-
Its syntax is:- element.nodeName OR node.nodeName