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 ...