Level 2 · Web Development Basics · Course 2.2 CSS and Responsive Design
Module 14: Introduction to CSS
Goal: use CSS to control how your pages look: colours, fonts and spacing, applied from one stylesheet to every page.
You'll need: your three-page site from Module 13 (home, about, contact).
Lessons
- 1What CSS is15–25 minutes✓
- 2Selectors and rules15–25 minutes✓
- 3Colours15–25 minutes✓
- 4Fonts and text15–25 minutes✓
- 5Spacing and borders15–25 minutes✓
🛠️Module practice: style your site
Using one external stylesheet for all three pages:
- Define your palette as CSS variables and pass a contrast check for body text.
- Choose one or two fonts, with readable sizes in
remand a comfortable line height. - Style the header, nav, footer and links (including
:hoverand:focus). - Style the contact form fields and button.
- Use a consistent spacing scale.
- No inline styles. Commit with a clear message.
✅Module check
Explain in a few sentences, in your own words:
Why does CSS live in a separate file, and what decides which rule wins when two disagree?
Show a good answer
A good answer mentions: a separate stylesheet keeps looks apart from content, so one file styles every page and a change in one place updates the whole site, while the HTML stays clean. When rules disagree, the more specific selector wins (id over class over element), and if they're equally specific, the one that comes later wins. Developer tools show which rule applied.
📝Module quiz
10 questions · 10 marks each · 100 marks in all · pass mark 70% · retry as often as you like ·
