Node Navigation Basics

The concept of root nodes, parents, children, sibling nodes, text nodes, and attributes are very important because the navigation in the tree is based on these ideas.

The document tree is represented by the document JavaScript object. There are a number of document operations dedicated to navigation. Listing 6-3 (it is based on the markup shown in Listing 6-2) demonstrates a few methods of navigation.

Create a free account to view this lesson.

By signing up, you agree to Educative's Terms of Service and Privacy Policy