Child Quote by Ryan Mitchell
““children are always exactly one tag below a parent, whereas descendants can be at any level in the tree below a parent.””
About This Quote
Source Article: Understanding the DOM Tree, 2020
Children are immediate descendants, while descendants can be deeper in the hierarchy.
In simple terms: Children are one level down; descendants can be many levels down.
Recognize the difference when navigating or manipulating trees.
Themes
Mood
Type
When to use this quote
- DOM manipulation
- CSS selectors
- JavaScript queries
- XML processing
Key Concepts
Questions to Reflect On
- How does this affect performance of queries?
- When would you need to consider deeper descendants?
Only works for tree structures; not applicable to graph models.