← Code

Layout and components

Lay out a page like a real website, on a laptop and on a phone.

Start1. Which rule wins
For teachers Usually Years 6–8 · 10 lessons (and 2 optional)

Control how a page is laid out, with boxes, Flexbox, Grid and components that repeat.

  • Usually Years 6–8
  • Lessons 10 (and 2 optional)
  • Do first Structure and style a page
Teacher guide

Standards, in general: main focus: Trace algorithms for errors (8P06); touches on: Design user experience (8P07), Design and prototype user experience (10P07). What this means

Rules that combine

Which rule wins, and how to style only the links in a menu.

1Which rule winsNot started
2Style the links in the menuNot started

Boxes

Block and inline, and every element as a box: padding, border and margin.

Layout

Rows with Flexbox, spacing, wrapping to fit any width, and components you copy.

Final challenge: lay out the club page

Lay out the club page from Structure and style a page. Two optional lessons go further: Grid, and a little JavaScript.

Progress is saved in this browser only. Nothing is sent anywhere.

For teachers: Teacher guide (notes, answers, solutions, slides and worksheets)