HTML DOM nodeName property
Definition and Usage
nodeName property returns the name depending on the type of node.
If the node is an element node, nodeName property returns the tag name.
If the node is an attribute node, nodeName property returns the attribute name.
Other node types, nodeName property returns back to a different node name depending on the node type.
Browser Support
All major browsers support nodeName property
grammar
node .nodeName
technical details
return value: | String representing the name of the node. |
---|---|
DOM version | Core Level 1 Node Object |