CSS Tutorial

Padding, Borders, and the Box Model

<!DOCTYPE html>
<title>Example</title>
<style>
  div {
    width: 150px;
    height: 50px;
  }
  .padding {
    padding: 20px;
    background: gold;
  }
  .no-padding {
    padding: 0;
    background: limegreen;
  }
</style>
<div class="padding">
  Padding
</div>
<div class="no-padding">
  No padding
</div>