edubun
English
Making websites · 9 units · about 149 min · 90 practice questions

CSS

Nine units on styling web pages with CSS, from the shape of a single rule to a finished page that rearranges itself on a phone. Every unit has a live editor that checks the computed styles of your page, plus flashcards and 9 to 11 practice questions with explanations.

Progress
Start

What you will learn

  • Know what happens to a declaration the browser does not understand
  • Keep enough contrast between text and background
  • Write a font stack that ends in a generic family
  • Draw columns and rows with grid-template-columns and fr
  • Turn design decisions into custom properties

Units

  1. 1What CSS does12 pages16 minExplain4Explore1Problem4Practice2
  2. 2Selectors and the cascade13 pages17 minExplain3Explore2Problem5Practice2
  3. 3Colour and units12 pages19 minExplain1Explore3Problem5Practice2
  4. 4The box model13 pages15 minExplain4Explore1Problem5Practice2
  5. 5Typography10 pages15 minExplain2Explore2Problem4Practice1
  6. 6Flexbox13 pages19 minExplain3Explore2Problem5Practice2
  7. 7Grid basics12 pages16 minExplain4Explore1Problem4Practice2
  8. 8Responsive design with media queries12 pages19 minExplain3Explore1Problem5Practice2
  9. 9Style a small page9 pages13 minExplain2Explore1Problem4Practice1

About this course

Even a page with no CSS has some style: headings are big and bold, links are blue and underlined, and lists are indented. Those come from the browser's default stylesheet, and your rules are applied on top of it. This is why the final project in the course is a good test. The bakery page from the HTML course gets its colours, spacing and layout from about 40 lines of CSS, and the HTML does not change at all.

Two common mistakes are built into the practice. A border written as border: 2px #333 draws nothing because it has no border style. And removing an outline with outline: none takes away the keyboard focus ring, so another clear focus style has to replace it. Visible keyboard focus is on the final checklist. One reassurance about layout: before flexbox, centring a box vertically took tricks, and with display: flex it takes two declarations, justify-content and align-items.

Before you start

CSS styles HTML, so start with HTML if you have not written a page by hand before. The last unit restyles the bakery page built at the end of that course. Every unit here has a live editor in the page, so nothing needs to be installed.

Course map

Making websites · Courses: 3
Sources for this course (5)
  • W3C CSS Working Group specifications: CSS Snapshot 2025, Selectors Level 4, CSS Cascading and Inheritance Level 5, CSS Color Level 4, CSS Values and Units Level 4, CSS Box Model Level 3, CSS Box Sizing Level 3, CSS Fonts Level 4, CSS Flexible Box Layout Level 1, CSS Grid Layout Level 2, Media Queries Level 4 and Level 5 (w3.org/TR/, checked 2026-10-17)
  • MDN Web Docs, Learn web development: CSS styling basics and CSS layout, and the CSS reference (developer.mozilla.org/en-US/docs/Learn_web_development/Core/Styling_basics, .../Core/CSS_layout, developer.mozilla.org/en-US/docs/Web/CSS, checked 2026-10-17)
  • W3C, CSS history and CSS1 Recommendation of 17 December 1996 (w3.org/Style/CSS20/history.html, w3.org/press-releases/1996/css1-rec, checked 2026-10-17)
  • W3C WCAG 2.2, success criteria 1.4.3 Contrast (Minimum)
  • 1.4.8 Visual Presentation, 1.4.10 Reflow, 1.4.12 Text Spacing (w3.org/TR/WCAG22/, checked 2026-10-17).

Checked: 2026-10-17