HTML elements are essentially little rectangles. Three important attributes control the space that surrounds each HTML element: padding
, margin
, and border
. An element's padding controls the amount of space between the element and its border.
.green-box {
background-color: green;
padding: 20px;
}