Edit

Setting Margins on all Sides

The margin property is used to set the space around the sides of an element's, outside of any defined borders.

Example of Code

<!DOCTYPE html>
<html>
<head>
    <title></title>
    <style>
      div {
        border: 1px solid orange;
      }
      div > p {
        background: gold;
        margin: 20px;
      }
    </style>
</head>
<body>
    <div>
      <p>
        This text has a margin of 20 pixels on all four sides. It is nested within a div with a border to make it easier to see the effect of the margin.
      </p>
    </div>
</body>
</html>

Output

           
     

        This text has a margin of 20 pixels on all four sides. It is nested within a div with a border to make it easier to see the effect of the margin.