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...
Up next · Lesson 7 of 27
Sibling Combinators
1 min read
6 of 27 lessons done

Ask Byte about this lesson
A private chat about this lesson. Byte has read the whole lesson, answers in seconds, and shows the section each answer comes from. Ask follow-ups in any language.
Questions & Answers
Public questions about this lesson. The AI Tutor answers right away in your language, the FreeAcademy team checks answers, and every learner can read them.

