Using jQuery Document Traversal Features

The DOM of a Web page is organized as a tree structure. The elements in the page have family-like names to refer to their positions relative to other elements.

For example, the HEAD and BODY tags are "children" of the HTML tag, and are "siblings" of each other. They have the HTML tag as their "parent". jQuery provides functions for navigating the document tree and processing sets of elements, such as:

This is paragraph 1

This is paragraph 2

This is paragraph 3

This is paragraph 4

This is paragraph 5