E-Learning Platform
0 of 139 builtAlways freeSign in
2.01 · Lab

Selectors & the Cascade

A card, a styling sheet, and two rules that disagree on purpose. Write them in the order the prompt asks for and watch the cascade settle the argument.

Exercise

Style a trail note card

Checks itself — try as often as you like

Below is a small card, already built. Style it with three rules, written in this order:

1. A p rule setting color to slategray and font-size to 18px — the baseline for every paragraph. 2. A .highlight rule setting color to crimson. 3. A .warning rule, written *after* .highlight, setting color to darkorange.

The last paragraph carries both classes (class="highlight warning"). Since .highlight and .warning are equally specific, whichever one you write last should win for that paragraph.