All HTML elements can be considered as boxes. In CSS, the term "box model" is used when talking about design and layout.
The CSS box model is essentially a box that wraps around every HTML element. It consists of: margins, borders, padding, and the actual content. The image below illustrates the box model:
Explanation of the different parts:
The box model allows us to add a border around elements, and to define space between elements.
border: 25px solid green;
<h2>Demonstrating the Box Model</h2>
<p>The CSS box model is essentially a box that wraps around every HTML element. It consists of: borders, padding, margins, and the actual content.</p>
<div>This text is the actual content of the box. We have added a 25px padding, 25px margin and a 25px green border. </div>
Getting a website for your small or large business is an essential way of making it grow globally.
Copyrights © 2018 Dreamsmolder.com. All rights reserved.