CSS Combinators

Cascading Stylesheets Tutorial


What are CSS Combinators?

CSS Combinators combine selectors in a way that describes their relationship to each other. Combinators help us target specific elements based on their relationship to other elements.

The 4 Combinator selectors


1. Descendant selector (space " ")

2. Child selector ( > )

3. adjacent sibling selector (+)

4. general sibling selector ( ~ )