- Tree structure with
document.documentElement
serving as root.- Element nodes representing HTML tags e.g.
document.body
- Leaf nodes such as pieces of text or comment nodes.
- Each node has
nodeType
property -Node.ELEMENT_NODE, Node.TEXT_NODE, Node.COMMENT_NODE
- Element node has
childNodes
alsofirstChild
,lastChild
,previousSibling
,nextSibling
,parentNode
- Finding elements
getElementsByTagName
getElementById
- Element nodes representing HTML tags e.g.
getElementsByClassName