Look at this representation
of an HTML page:
The HTML
element is
at the top
as the parent of
all the other elements.
The same kind of relationship
is seen for other elements as well.
For example,
the p
element is above
the span
element.
Thus, the p
element
is the parent of
the span
element.
Representing the parent-child
relationship in the DOM
gives us a tree-like structure.
This is the DOM tree.