In web development, the CSS box model refers to how HTML elements are modelled in the browser. In HTML every element is considered a box. There more to that box than just content that the element wraps around. It consists of margins, borders, padding, and the actual content.

The box model makes up the HTML box as well as shows how to box components affect the layout and how the width and height of the box are calculated.

Kamsayiny Srikaran

Undergraduate at Faculty of Information Technology University of Moratuwa

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store