The AI Starting Point

Courses / CSS Foundations

CSS Foundations

Make web pages look the way you want: colour, type, spacing, layout with flexbox and grid, and responsive design.

4 lessonsAbout 3 hoursComplete beginner

Progress

Loading…

Not sure yet? Get the free starter lesson first.

Enter your email and we will send it to you.

$15 $20
R255 (about $15)

What you will be able to do

  • Write CSS rules with selectors and properties
  • Control colour, fonts and spacing using the box model
  • Lay out content with flexbox and grid
  • Make a page adapt to phones with media queries
  • Find and fix styling problems with browser developer tools

What you need: A text editor, a browser and a simple HTML page (HTML Foundations is helpful but not required).

Lessons

  1. 1Rules, selectors and colour40 minutes · Lesson quiz
    • Anatomy of a rule
    • Choosing what to style
    • Colour and type
    • Worked example: a note box
    • Try it: restyle a page
  2. 2The box model and spacing45 minutes · Lesson quiz
    • Everything is a box
    • Sizing without surprises
    • Units
    • Worked example: a card
    • Try it: three cards
  3. 3Layout with flexbox and grid50 minutes · Lesson quiz
    • Flexbox: one direction
    • Grid: rows and columns
    • Debugging layout
    • Worked example: nav and cards
    • Try it: a landing layout
  4. 4Responsive design and a finished page50 minutes · Lesson quiz
    • Mobile first
    • Media queries
    • Finishing touches
    • Worked example: responsive layout
    • Project: style a landing page

Final project: restyle a page

Style a complete page with a coherent colour palette, readable type, a flexbox nav, a grid of cards and one media query.

Self-check: it works at 320px wide with no sideways scrolling, text has strong contrast and every link shows a focus style.

Next steps

  • Take JavaScript Foundations to add behaviour.
  • Take the Beginner Web Development course to combine HTML, CSS and JavaScript.
Start lesson 1