June 2025
Beginner
817 pages
31h 30m
English
The term node comes up quite often in connection with the DOM and always causes confusion. The principle is simple: At the top of the DOM tree, there’s the document object, followed by the root of the DOM tree, which is usually the html element. The head and body elements follow below that. The html element is the parent element for the head and body elements. The head and body elements contain other child elements. You already know the principle. All these elements are referred to as nodes in the DOM. Not only are the HTML elements nodes for the JavaScript in the DOM, but the HTML attributes and text contents are also connected and are real nodes in the DOM tree.
Regardless of the node type, ...
Read now
Unlock full access