The box model
Every HTML element is a box with four layers: content, padding, border, and margin. These layers control the element's size and spacing.
Understanding The box model in HTML & CSS
What it does: The content area is the core of the box model, holding the element's actual content. border-box is widely used because the element's total size matches the declared width. The order outward is: content → padding → border → margin. Margin is the outermost layer — it separates the element from its neighbours. Margin is outside the border — it pushes other elements away. CSS declarations always need a colon between the property name and its value. Property names must be spelled exactly. 'margn' is not a valid CSS property.
Common mistakes: div.hover targets a div with class='hover', not all divs. To style all div elements, use div {} without a class selector. A colon is missing after the property name. It should be padding: 15px; not padding 15px;.
Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.
This module's key terms are also in a printable crossword (Modules 43–52) and word search (Modules 43–63).
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
box modelFill in the Blanks
Spot the Error
Student with a class code? Join your class →