The DOM, or Document Object Model, is the API used by web browsers and other applications to access the contents of an HTML document.
The DOM represents the structure as a tree, nodes can contain child-nodes, nodes with no children are said leaf nodes.
With it, one can manipulate the structure a...