Path 15

CSS Fundamentals

Learn the visual building blocks of CSS from zero: colour and readable contrast, linear, radial and conic gradients, and natural-looking box shadows.

Good interfaces are readable first and pretty second. This path teaches three visual building blocks of CSS in that order: choosing colours that everyone can read, painting backgrounds with gradients, and adding depth with shadows. Each lesson uses one of our free tools, so you can see every rule change the result straight away.

Who this path is for

Beginners who know a little HTML and want to style pages with confidence, designers moving into code, and developers who copy CSS snippets but want to understand them. No build tools or frameworks are needed: everything works in a plain stylesheet.

What you will be able to do

  • Check text colours against WCAG 2.2 contrast requirements and fix a colour that fails.
  • Write linear, radial and conic gradients by hand, with colour stops and a safe fallback.
  • Build layered box shadows that look natural and keep their edges visible on any background.

How the lessons work

Each lesson explains one idea, works through an example with numbers calculated by the tool itself, links to the tool so you can try it, and ends with a five-question quiz. Quiz progress is saved in your browser only.

3 lessons

  1. Lesson 1Colour and Contrast: Making Text Readable

    Learn how contrast ratios work, what WCAG 2.2 asks for normal and large text, and how to fix a grey or brand colour that fails, with checked examples.

    • Beginner
    • 10 min
    • ✓ Completed
  2. Lesson 2Gradients: Linear, Radial and Conic

    Write CSS gradients by hand: directions and angles, colour stops and hard stops, smoother blends with OKLCH, a safe fallback and readable text on top.

    • Beginner
    • 12 min
    • ✓ Completed
  3. Lesson 3Shadows and Depth with box-shadow

    Understand every box-shadow value, why several soft layers look more natural than one dark shadow, and how to keep shadows fast and edges visible.

    • Beginner
    • 10 min
    • ✓ Completed

More lessons are being written. Quiz progress is saved in this browser only. Nothing is sent to us.