<div class="container">
  <p>
    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Minima, in, odit autem tempora fuga neque quos expedita repudiandae labore iure. Rem, blanditiis natus unde nisi explicabo odio pariatur maxime earum.
  </p>
  <p></p>
  <p>
    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Doloremque, tempora, ratione ad distinctio iusto illum accusamus qui porro inventore commodi voluptates tenetur dolor sed harum excepturi nemo aperiam beatae sint!
  </p>
  <p class="pseudo"></p>
  <p><!-- COMMENT HERE --></p>
  <p><p></p>
</div>
body {
  color: #555;
  font-size: 1.1em;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.container {
  margin: 40px auto;
  max-width: 700px;
}

p:empty {
  background-color: linen;
  padding: 15px;
}

.pseudo::before {
  content: "I am a piece of generated content inside a paragraph. The paragraph is still considered empty and gets a background color.";
}