located at the top of the page
It has no parent and is called the root node
1.Element node
It can be said that the entire DOM model is composed of element nodes
For example, the text paragraph element "
", the name of the unordered list "
2. Text node
For example, the text "Title 1" in
3.Attribute node
As an element on the page, it has more or less attributes. For example, almost all elements have a title attribute. Since attributes are placed in tags, attribute nodes are always included in element nodes
Have you guys gained a deeper understanding of DOM model nodes? I hope you like it.