Child Combinator
The child combinator (>) selects only direct children, not deeper descendants.
Child vs Descendant
Loading Selector Playground...
Compare:
.parent > p- only DIRECT child paragraphs (2 matches).parent p- ALL descendant paragraphs (3 matches)
Practical Example
Loading Selector Playground...
.menu > li selects only top-level items, not submenu items.
Styling Direct Children
Loading CSS Playground...
Chaining Child Combinators
Loading Selector Playground...
Exercise: Style Direct Children
Style only the direct child divs of the container:
Loading CSS Exercise...

