The Box Model
Learn how the CSS box model works.
Overview of the box model
When rendering a document, the browser sees each element as a rectangular box; this is the box model. CSS determines the size of the box, and is based on the following properties:
content
padding
border
margin
A good way to visualize this is to open our browser’s
Get hands-on with 1400+ tech skills courses.