The DOM tree

The DOM (Document Object Model) is the representation of an HTML page as a tree of objects that JavaScript can read and modify. Each tag becomes an element node, with parents, children, and siblings. The document object is its entry point. Modifying the DOM changes the display.

Example

document.body.children.length

Related concepts

The whole glossary