Combinator Selectors
Combinators express the relationship between two selectors. CSS provides four combinators that let you target elements based on their position in the HTML tree.
Descendant Combinator (space)
A B selects every B that is a descendant of A, regardless of nesting depth.
Child Combinator (>)
A > B selects B only when it is a direct child of A.
Adjacent Sibling Combinator (+)
A + B selects the first B that immediately follows A at the same level.
General Sibling Combinator (~)
A ~ B selects all B elements that follow A as siblings.