The box model describes how much space an item takes up on a webpage. It is like a framed picture: the picture is inside, a mat surrounds it, a frame edges it, and empty wall separates it from other pictures.

For a webpage box, the content sits inside padding, then a border, with margin outside. These layers affect how large the element feels and how close it sits to its neighbors.

Knowing the layers helps explain why a card may take more room than its picture or words alone. Adjust the right layer to change either its inside comfort or its distance from other items.