CSS Margin
Advertisements
CSS Margin
The margin are used for give sufficient space around an element (outside the border). The margin does not have a background color, and it is completely transparent. Margin have four properties which is given below;
- top
- bottom
- left
- right
Example
<html> <body> <p style="margin-top:100px;"> Margin from top</p> <p style="margin-bottom:100px;">Margin from bottom</p> <p style="margin-right:50px;">Margin from right</p> <p style="margin-left:50px;">Margin from left</p> </body> </html>
Output
Margin from top
Margin from bottom
Margin from right
Margin from left
Browser supported
Properties | |||||
margin | Yes | Yes | Yes | Yes | Yes |
Google Advertisment