The CSS margin property is used for creating space around the element. CSS provides different properties, with the help of which you can set the margin for an element’s each side (right, left, top and bottom).
CSS Margin property is used to define the space around elements. It is completely transparent and doesn't have any background color. It clears an area around the element.
If the margin property has four values:
If the margin property has three values:
If the margin property has two values:
If the margin property has one value:
margin: length|auto|initial|inherit;
Supported Browsers: