CSS Margin

Advertisements

Prev Tutorial Next Tutorial

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
marginYesYesYesYesYes

Prev Tutorial Next Tutorial

Google Advertisment

Buy This Ad Space @$20 per Month, Ad Size 600X200 Contact on: hitesh.xc@gmail.com or 9999595223

Magenet is best Adsense Alternative here we earn $2 for single link, Here we get links ads. Magenet

For Projects 9999595223

Google Advertisements


Buy Websites 9999595223

Buy College Projects with Documentation Contact on whatsapp 9999595223. Contact on: hitesh.xc@gmail.com or 9999595223 Try this Keyword C++ Programs

Advertisements