Skip to content

Lesson 4 of 4 · 7 min

Boxes, borders and spacing

Every element on a page is a box. padding adds space inside the box, margin adds space outside, and border draws an edge.

border-radius rounds the corners: great for friendly, modern designs.

Your turn: Add a second card with a different fun fact and colour.

Code editor

Live preview