CSS - Margin

Margin is the property for space outside of the element. 

Ex: 
p{
   margin : 3px;
}

Following are the properties related to the margin
  • margin-top
    Margin-top property specify the space from the top border to the text.
  • margin-bottom
    Margin-bottom property specify the space from the bottom border to the text.
  • margin-right
    Margin-right property specify the space from the right side border to the text.
  • margin-left
    Margin-left property specify the space from the left side border to the text. This is the default margin. Same output comes with margin-left & margin.

2 comments: