The descendant combinator is whitespace (usually a space) between two selectors. It matches elements selected by the second selector that have an ancestor matching the first — at any depth.
Example: .box p styles every p inside .box, including nested ones. Prefer the child combinator (>) when you need only direct children. Read selectors right to left: the rightmost part is what you style.
Baseline · Widely available.
Not deprecated. Core CSS since CSS1. Extremely broad support across browsers.
Syntax
CSS Syntax
syntax.css
ancestordescendant{ /* declarations */ }
The combinator is whitespace (usually one space) between the two selectors. Examples: nav a · .box p · li li · div span
Footer stays default. Its link is not a descendant of nav.
Safer than bare a. Avoids restyling every link on the page.
Edge Cases & Pitfalls
If too many elements light up, check these first.
vs >
Space ≠ child combinator
div p matches deep nests. div > p matches only direct children. Use > when depth must be exact.
scope
Broad ancestors over-match
div span can hit far more than you intend. Prefer a classed container like .card span.
compound
No space in compound selectors
a.button (no space) is one element with both conditions. a .button (space) is a descendant with class button.
specificity
Each simple selector adds specificity
.nav a is more specific than bare a. Long chains can become hard to override — keep them short.
read
Read right to left
The browser finds candidates for the rightmost selector, then checks ancestors. Mentally: “style these, but only under that.”
Compatibility
Browser Support
The descendant combinator is a browser CSS selector. Node.js, Deno, and Bun do not apply it.
✓ Baseline · Widely available
descendant combinator
Supported everywhere CSS is supported (CSS1-era). Safe for all teaching and production use.
100%Core support
Google Chrome1+
Full support
Mozilla Firefox1+
Full support
Apple Safari1+
Full support
Microsoft Edge12+
Full support
Opera3.5+
Full support
Samsung Internet1+
Full support
Internet Explorer3+
Full support
ancestor descendantUniversal
Bottom line: No prefixes. No polyfills. It is not a runtime API.
Remember
Key Takeaways
Role: match nested elements under an ancestor at any depth.
Syntax: whitespace between selectors (usually a space).
vs >: descendant = any depth; child = one level only.
Tip: scope with a classed ancestor to avoid over-matching.
One line: a space means “somewhere inside” — style the right side, limited by the left ancestor.
Frequently Asked Questions
A space between two selectors matches elements selected by the second selector that have any ancestor matching the first — child, grandchild, or deeper.
The space (descendant) matches at any nesting depth. The > child combinator matches only direct children one level down.
Put whitespace between selectors: div p, .article li, or nav a. The right-hand side is what gets styled.
It limits styles to a section of the page so you do not restyle every p on the site by accident.
Yes. It has been in CSS since CSS1 and is Baseline Widely available in every modern browser. It is a selector combinator, not a Node.js feature.
Yes. The combinator is one or more CSS whitespace characters and may include CSS comments between the selectors.