Another technique for changing the size of individual boxes, as well as controlling the relationships of elements to each other, is with the margin & padding CSS properties.
In HTML and CSS, we imagine elements as boxes with certain properties. Specifically, every block element in HTML has padding, a border, and margin. This is known as the “Box Model”.
The following pages will help breakdown these areas.
The above “Box Model” image comes from web specifications. Please read both of the following;