Child combinator
noun
say it: “CHYLD KOM-bih-nay-ter” /tʃaɪld ˈkɒmbɪneɪtər/
The > sign between two selectors, read "child", that matches only elements directly inside another one, one level down.
What is the child combinator?
The child combinator > picks elements that are direct children of another, not deeper ones.
.menu > li { display: inline-block; } /* only the top-level list items */
In a sentence
- “I wrote .menu > li with the child combinator, so only the top menu items got a border, not the items in the smaller lists inside them.”
Level: Novice · More CSS terms at this level
Updated