4.11. A new type of tree: the DOM treeOnce the browser has your markup with the <html> element at the top, it creates a new object for each node in the tree. The result is a bunch of objects, all "connected" together, like you see here: We've ditched the tree image... we figure you've got the idea by now. head title "Binary Tree Selection" p Below are two binary tree options:" div "Our " em " trees are great for folks that are far away." "depth-first" These are text node objects. Although this doesn't look much like a tree anymore, you can still see the root, branches, and leaves, just like on page 225. This entire thing is usually called a DOM tree, because it represents your document using objects and provides a tree model of your markup. <html> is the root element of the DOM tree. html body All of these objects are element nodes, because they represent HTML elements. div em "Our " " trees are a favorite for nearby neighbors." "breadth-first" Order is still preserved, as elements and text appear in exactly the same order as they do in the HTML markup. p "You can view other products in the " a "." "Main Menu"
|