CSS: descendant selector (space)

By Xah Lee. Date: . Last updated: .

Match Ancestor Tag (aka Descendant Combinator)

aaa bbb

Match any bbb that is nested inside aaa at any depth.

Each expression can be compound selector.

Can also be chained like this:

a b c

/* any span that's nested in div */
div span {color:red;}
<div>
 <p>
  <span>match</span>
 </p>
</div>

CSS, Selectors

simple selectors
selector list
relationship selectors (combinators)
special selector
misc