1. Which rule wins
Try firstA paragraph matches p { color: teal; font-size: 20px; } and .note { color: crimson; }. What colour and size is it?
Check your answer
Crimson and 20px. It takes both rules; where they clash on colour, the class rule wins.
The video and the picture show the same steps:
- A rule on
pturns every paragraph teal. - The marked paragraph matches a second rule,
.note, so it takes the size from it too. - Where both rules set the colour, the class wins.
- A comma gives two selectors one rule:
h1, p { }.
In the picture, the marked paragraph is crimson and 24px, and the plain paragraphs and the heading are teal.








