CSS combinator selector
Combinator selectors explain the relationship between the element you want to target and one of the other elements — whether the target's children, parents, ancestors, descendants, or siblings.
The descendant selector symbol is a space (
) — for example, div h1
. This selector targets all <h1>
elements nested inside all <div>
elements. The other combinators are the child selector (>
), the adjacent sibling selector (+
), and the general sibling selector (~
).[1]