read-only
The type of node.
This value is one of:
ATTRIBUTE_NODE
if this node is an attribute.CDATA_SECTION_NODE
if this node is aCDataSection
.COMMENT_NODE
if this node is aComment
.DOCUMENT_FRAGMENT_NODE
if this node is aDocumentFragment
.DOCUMENT_NODE
if this node is aDocument
.DOCUMENT_TYPE_NODE
if this node is aDocumentType
node.ELEMENT_NODE
if this node is anElement
.ENTITY_NODE
if this node is an entity.ENTITY_REFERENCE_NODE
if this node is an entity reference.NOTATION_NODE
if this node is a notation.PROCESSING_INSTRUCTION_NODE
if this node is aProcessingInstruction
.TEXT_NODE
if this node is aText
node.
Other resources
-
Node.nodeType from MDN.