Element.nodeName (Property)

Part of the internal document hierarchy management.


DOM level - 1
JavaScript - 1.5
JScript - 5.0
Internet Explorer - 5.0
Netscape - 6.0
Property/method value type:String primitive
JavaScript syntax:-myElement.nodeName

The nodeName property is part of the browser's internal DOM management. It contains a value that is the name of the HTML tag that instantiated the object. This is also reflected as the tagName property.

When the object is a Text object, the nodeName value is "#text" because there is no HTML tag to represent plain text and a text node is placed between HTML Element objects. It's like the mortar between the bricks in a wall.

See also:Element object, Node.nodeName

Property attributes: