<!DOCTYPE html>
<style>
.margin-top { margin-top: 10px; }
.margin-bottom { margin-bottom: 20px; }

.grayblock {
  background: lightgrey;
  height: 20px;
  width: 150px;
}

</style>

<div class="grayblock margin-top margin-bottom"></div>

<div class="grayblock margin-top"></div>
<div class="grayblock" style="background: lightblue;"></div>

<div class="grayblock margin-top"></div>
<div class="grayblock" style="background: lightblue; height: 30px;"></div>
<div class="grayblock"></div>