As mentioned, a node is the equivalent of each family member in a family tree. A node is an intersecting point in a tree that also contains data.

There are multiple types of node objects in the DOM tree. In our diagram, the node objects with the sharp-edge rectangles are Element nodes, while the rounded edge rectangles are Text nodes, because they represent the text inside the HTML paragraph elements.

When trying to modify a web page, the script will mostly interact with the DOM element nodes and occasionally text nodes.


In the diagram to the right, the DOM element nodes are highlighted red. These correspond to elements in the HTML document. Move on to the next exercise when you’re ready!

Sign up to start coding

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Or sign up using:

Already have an account?