nodeName

The nodeName JS Node returns a string appropriate for the type of node.

Type Description
Element Its HTML-uppercased qualified name
Attr Its qualified name
An exclusive Text node "#text"
CDATASection "#cdata-section"
ProcessingInstruction Its target
Comment "#comment"
Document "#document"
DocumentType Its name
DocumentFragment "#document-fragment"

Syntax

node.nodeName

Examples

1 · Element

2 · Attr

3 · Text

4 · CDATASection

5 · ProcessingInstruction

6 · Comment

7 · Document

8 · DocumentType

9 · DocumentFragment

nodeType

baseURI

childNodes

cloneNode

compareDocumentPosition

contains

firstChild

getRootNode

hasChildNodes

isConnected

isEqualNode

lastChild

nextSibling

nodeType

normalize

ownerDocument

parentElement

parentNode

previousSibling

Web Hypertext Application Technology Working Group (WHATWG)

Home Menu