Styling with CSS – Year 8 Computing lesson
Pupils learn to write CSS rules with selectors, properties and values in a separate style sheet and link it to every page so the site looks consistent.
Lesson 3 of 6 in unit 8.4 Web Development (HTML and CSS), taught in Year 8, Spring 2. It answers one big question: How can one file make every page look the same?
By the end, pupils can write CSS rules with selectors, properties and values in a separate style sheet and link it to every page so the site looks consistent.
- The Build (the main task)
- Write a style sheet with three rules (body, h1 and nav links) in the club's colours, and link it to all three pages.
- Support version
- Part-filled code: the three rules are given with gaps for the selector, a property name or a value in each.
- Challenge
- Add a class so one paragraph on the Join page stands out, and explain why the rule does not change the other paragraphs.
- Real-world link
- Organisations keep the same colours and fonts on every page so visitors know they are still on their site; today pupils give the club site its own look.
- Key words
- CSS, Selector and Consistent, each with a definition, an icon and a common mix-up on the key vocabulary slide.
- Misconceptions it tackles
- “p { color: green; } changes only the first paragraph”; “CSS accepts British spelling, so colour: works”.
- National Curriculum
- NC3 (two or more languages, at least one textual; data structures; modular programs with procedures or functions); NC8 (create, reuse and revise digital artefacts for an audience: trustworthiness, design, usability).
Every lesson follows the same Code & Commerce structure: a Bell Task recall starter, key vocabulary with definitions and icons, short teaching chunks with a check before pupils move on, The Build (one main task), challenge questions that get harder, and an exit question. Answers reveal one at a time on the slides, and everything is editable PowerPoint and Word.
Pupils need computers for the main task.
Also sold in the Web Development (HTML and CSS) unit bundle, which includes the medium term plan, and in the full-year and complete-course bundles.
What's included
- Slide deck (PowerPoint)
- Lesson plan (Word)
- Worksheet (Word)
- Support worksheet with scaffolds (Word)
- Starter and finished website files for the club website
- Starter and finished website files for the club website
- Single-teacher licence: use and adapt it with your own classes
More for KS3 Computing
See allPupils learn to write a correctly nested HTML page with headings, paragraphs and a list, and explain what each tag does.
Free sample lessonPupils learn to add hyperlinks between pages and to another website, add an image with alt text, and explain what makes up an HTML element.
Pupils learn to explain who accessibility helps, check a web page against an accessibility checklist and improve it so its user interface is inclusive.
Written for the specifications named. Not endorsed by or affiliated with any exam board.