CSS Tutorial

Setting Margins on all Sides

<!DOCTYPE html>
  div {
    border: 1px solid orange;
  div > p {
    background: gold;
    margin: 20px;
    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.