The box model
Every element is a box with four layers, from the inside out:
- content, the text or image itself
- padding, space inside the border
- border, the line around the box
- margin, space outside the border
Padding makes a box feel comfortable to read. border-radius rounds its corners.
Example
<style>
.box { padding: 16px; border: 3px solid teal; margin: 20px; }
</style>
<div class="box">Padding inside, margin outside</div>
border: 2px solid navy; sets the width, style and color in one line.Your tasks
0 of 3 done- Give .card at least 16px of padding
- Add a border to .card
- Round the corners with border-radius
Tutor
The tutor guides you toward the answer instead of handing it over. It uses your own Claude usage.
Quick check
Which layer adds space outside the border?
No problems found. Unclosed tags, missing semicolons and errors show up here in plain words.