September 2014
Intermediate to advanced
148 pages
2h 15m
English
CHAPTER 6
![]()
Relationship selectors
Relationship selectors match elements based on their relation with other elements. To understand these selectors, it is important to recognize how elements in a web document are related to each other.
HTML hierarchy
An HTML document can be visualized as a tree with the <html> element as the root. Each element fits somewhere on this tree, and every element is either a parent or a child of another element. Any element above another one is called an ancestor, and the element directly above is the parent. Similarly, an element below another one is called a descendant, and the one directly below is a child. In turn, ...
Read now
Unlock full access