Read a longer stylesheet, find the rule that does a job, and change just that rule.
A stylesheet grows rule by rule, and the skill is finding the one rule that does the job you want to change.
The newsletter page has grown a stylesheet. Its <style> block, in the <head> of the page wrapper, now holds several rules, and some of them apply to the same elements. Every step here is a job on that page: read the rules, find the one that does the job, and change only that rule.
<!DOCTYPE html>
<html>
<head>
<title>School newsletter</title>
<style>
body {
font-family: sans-serif;
}
h1, h2 {
color: navy;
}
h2 {
color: teal;
}
.note {
background-color: lightyellow;
}
</style>
</head>
<body>
<header>
<h1>Library news</h1>
</header>
<main>
<section>
<h2>New books</h2>
<p>The library has 200 new books this term.</p>
</section>
<section>
<h2>Book fair</h2>
<p class="note">The book fair starts on Monday in the library.</p>
</section>
</main>
</body>
</html>
What does each rule change?
The Book fair heading matches two rules.
Match each rule with what it changes.
Make the section headings orange without changing the title.
Before a hint: what kind of stuck is this? Try a strategy first
The section headings are teal because of the rule after the group rule. Change that one.
Find h2 { color: teal; } and change teal.

Make the paragraph marked note stand out in lightpink.
Before a hint: what kind of stuck is this? Try a strategy first
The rule for the marked paragraph starts with a dot. Change its colour name.

Make the section headings orange, and leave the title navy.
This ticks when your page has all of the above.
Make the note paragraph's background lightpink.
This ticks when your page has all of the above.
The menu is a <nav> of links, and the story has a link of its own.
Look at how the menu sits on the page.
Add a rule that removes the underline from the menu links and gives them the colour navy. The link in the story must keep its underline.
Before a hint: what kind of stuck is this? Try a strategy first
Write a new rule below the others in the <style> block. Its selector is two words.
nav a { text-decoration: none; } removes the underline, and the color line chooses the link colour.

Remove the underline from the menu links only.
This ticks when your page has all of the above.
Work out the width before you write any rule.
Each section needs the same class, card.
Before a hint: what kind of stuck is this? Try a strategy first
A class is an attribute, so it goes inside the opening tag of each <section>.

Write a .card rule with padding and a border. Add margin too, so the cards do not touch.
Before a hint: what kind of stuck is this? Try a strategy first
A class rule starts with a dot. Write it in the <style> block.
.card { padding: 16px; border: 2px solid gray; }

A card rule says width: 300px; padding: 20px; border: 2px solid gray; How wide is the card on the page, in pixels?
Mark both sections with the class card.
This ticks when your page has all of the above.
Add a .card rule with padding and a border.
This ticks when your page has all of the above.
Maya wrote a .card rule for the newsletter. The border shows, but the cards look squashed.
<!DOCTYPE html>
<html>
<head>
<title>School newsletter</title>
<style>
body {
font-family: sans-serif;
}
.card {
padding: 16;
border: 2px solid gray;
margin: 16px 0;
}
</style>
</head>
<body>
<main>
<section class="card">
<h2>New books</h2>
<p>The library has 200 new books this term.</p>
</section>
<section class="card">
<h2>Book fair</h2>
<p>The book fair starts on Monday in the library.</p>
</section>
</main>
</body>
</html>
Maya's cards have a border, but the words touch it, and there is no error. Click the line that causes it.
Lesson done. You've finished every step you need.
Students read a whole newsletter stylesheet and change just the rule that does each job, using rules that combine, links in a menu, block and inline boxes, and the box. About 45 minutes.
Open the teacher guide: answers, solutions, slides and a worksheet.
This is a review lesson: nothing new is taught, and each step uses ideas from earlier lessons. Do the cards step yourself first (about 5 minutes).
The page is a whole document, with the page wrapper from Structure and style a page (<!DOCTYPE html>, <head> with the <style> block, <body>). Only the <body> shows. The stylesheet has a group rule, a tag rule that comes after it, a class rule, and later a descendant rule (nav a) and a card class. Students use rules that combine, links in a menu, block and inline boxes, and the box in one page.
Choosing which rule to change. Ask them to name the job first, then point to the rule that does it before they type.
Stretch: Add a second class, `.featured`, with a different border colour, and put it on the headline section as well as card. Which border wins, and why?
Support: Give students only the Change one rule and Turn the sections into cards steps, and a copy of the page with the class already on both sections.
Next unit is Layout: Flexbox puts boxes in a row, such as a menu. Class idea: ask students to find three cards on a real website and sketch their padding, border and margin.