descendant
Any node below a given node in the DOM tree: its children, their children and so on.
In more detail
The children property lists only direct child elements, while childNodes also includes text and comment nodes. Many CSS properties such as color are inherited by all descendants.
Related terms
- ancestor — Any node above a given node in the DOM tree: its parent, the parent's parent and so on up to the document.
- sibling — A node that shares the same parent as another node in the DOM tree.
- subtree — A node together with everything below it, which is itself a tree.
Taught in
- HTML Parsing, Tokenization And The Document Object Model (DOM) — Frontend Architecture & Web Platform
- Modern DOM Querying: querySelector, closest And matches — Frontend Architecture & Web Platform
- The Cascade Algorithm: Specificity, Inheritance And Source Order — Frontend Architecture & Web Platform