MATERIAL FOR YOUR STEP 5 PAGE
Everything inside the gray-blue box below is what you rewrite, in your own words, onto your step5.html page.
The box first, then the thing inside
A compound rule names a box, then the thing inside it. header h1 styles only the h1 headings that sit inside a header — not every h1 on the page. The last thing listed is what actually gets styled; everything before it just says which box it must sit inside.
header h1 {
font-size: 3em;
color: #ffffff;
}
main h1 {
font-size: 2em;
color: blue;
}
A space is not a comma
footer h1 (a space) reaches h1s inside footers. footer, h1 (a comma) styles all footers AND all h1s — a completely different meaning. And a compound rule doesn’t leak: header h1 never touches an h1 in the footer.
When it beats the last guy
“Last guy wins” is the tiebreaker between equal rules. A compound rule like header h1 is more specific than a plain h1 rule, so it wins even if the plain rule sits lower in the file. Specificity beats position.