In the HTML DOM (Document Object Model), everything is a node: The document itself is a document node, All HTML elements are element nodes, All HTML attributes are attribute nodes, Text inside HTML elements are text nodes, Comments are comment nodes
The tree structure is a way of thinking about how the web page is structured. For example the Document would be the trunk of the tree with two main branches called Head and the other being the body of the docuent. Then bothe of those have their own brances with the head having title link script and other elements, while the body may have header footer nav div elements. To go even further those elements can have branches such as div and inside those div's are content (the Leaf of the tree).