DOM node

One object in the DOM tree, such as an element, a run of text or a comment.

In more detail

Every node has a nodeType number: 1 for elements, 3 for text and 8 for comments. Properties like childNodes return all node kinds, including whitespace text between tags, while element-only properties such as children skip them.

Related terms

Taught in

References