How would you chain two class selectors together?


In this exercise CSS 1|12 we learnt how to chain a name tag and a class. I’m wondering how would you chain two class selectors e.g. chaining .green and .cursive together?

Would it be .green cursive or .green.cursive?

.green .cursive {
color: Green;
font-family: cursive;


This is not chaining, but descendant. It matches any cursive class that is a descendant of a green class.

<div class="green">
  <div class="cursive">


To have a selector match an element that is both green AND cursive we literally do chain them…

.green.cursive {}

with no whitespace separating them.

<div class="green cursive">



That makes sense. Never had to chain selectors before.