Bummer! This is just a preview. You need to be signed in with an account to view the entire instruction.

Well done!

You have completed (UPI) Chapter 9: Understanding the Document Object Model (DOM) with JavaScript!

Instruction

Nodes

Nodes

When loading into the browser, the HTML document is broken down into a tree of nodes. For example, consider the following HTML snippet:

<div id="exampleDiv">This is an<br>example HTML snippet.</div>

Through the DOM, JavaScript sees this snippet as four nodes:

  1. Div Node:
    • The <div> from its start tag through its end tag is one node.
    • This ...