From the course: Web Programming Foundations
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
The node tree: How the browser sees a web document
From the course: Web Programming Foundations
The node tree: How the browser sees a web document
- Any time a browser is asked to display an HTML document, it creates a document object model or DOM, which is a structural representation of the elements in the document and their relationships. This document object model can be visualized as a DOM tree, where each element is a leaf or node, and the connections are branches. When you add new elements to an HTML document, you are effectively adding a node to this DOM tree. When you target elements using CS or Javascript, you ask the browser to follow the branches all the way from the root to the node or nodes in question. This is called either walking or traversing or navigating the DOM. When I develop, design, and work with web documents, I often find it useful to visualize or actually draw out the dom tree or part of the tree to understand relationships and inheritants between different elements. This also encourages me to reduce complexity and avoid unnecessary nesting. This way, I'm able to keep accessibility and logical structure…
Contents
-
-
-
From URL to website2m 43s
-
(Locked)
The web, in a browser1m 29s
-
(Locked)
The structure of a web document visualized1m 29s
-
(Locked)
The node tree: How the browser sees a web document1m 23s
-
(Locked)
HTML: The source code of the web2m 48s
-
(Locked)
The web document is a document with superpowers2m 54s
-
-
-
-
-