child combinator

Planted Jul 2026 Tended 3 months ago Linked from 1 note

Contents

The child combinator [parent > child] scopes descendant styling from any descendant that matches the child selector to only direct descendants.

example

article > p selects only paragraphs that are directly within the article, not nested within other elements.

…whereas article p selects all p within article.

see also

reference: