CSS Margins
PropertyValuesDescription
margin margin-top
margin-right
margin-bottom
margin-left
Sets the margin properties in one statement

margin-bottom

auto
length
%
Sets the bottom margin of an element

margin-left

auto
length
%
Sets the left margin of an element

margin-right

auto
length
%
Sets the right margin of an element
margin-top auto
length
%
Sets the top margin of an element


Example

This is just a test to see if magin properties work with a paragraph. I set the margin to 100pt which should set the margin all around this. I also set paragraph width and put a border around it. right mouse click and view source to see. Note : This doesn't set margin in the object, we will need to use padding for that. It sets margin around the outside of the object - it works like hspace does for images.