MicrolearnENPTES

The box model

Lesson 6 of 20 · Web.Micro

Every element is a box: content, padding, border and margin. Master the box and layouts get easy.

Padding is space inside the border, border is the line, and margin is space outside that pushes other boxes away. Change the numbers and watch the card.

Check yourself

Which property adds space between the content and the border?

Do it in the browser: a real HTML, CSS and JavaScript tool, a short mission and instant feedback. No install.

Start this lesson — free
← Selectors and coloursFlexbox →

All lessons · Web.Micro