Lesson 6 of 18

📦 CSS Box Model

🎯 Grades 9–12 ⏱ ~35 minutes 🟡 Intermediate

What You'll Learn

  • The four layers of the box model: content, padding, border, margin
  • How box-sizing: border-box fixes confusing size math
  • Display values: block, inline, inline-block, and none
Quick Check

1. What is padding in the CSS box model?

AThe space outside the border
BThe space between content and border
CThe visible outline around the element

2. Why use box-sizing: border-box?

ASo width includes padding and border — no surprise size math
BTo add a border automatically to all elements
CTo remove margins from all elements

3. Which display value hides an element AND removes its space?

Adisplay: hidden
Bvisibility: hidden
Cdisplay: none

4. Which is the outermost layer of the box model?

APadding
BBorder
CMargin