E:empty

Matches an E element, that has no children, including text nodes (Source: W3C)

HTML:

  1. <p>Lorem ipsum dolor sit amet, consectetur</p>
  2. <p></p>
  3. <p>Lorem ipsum dolor sit amet, consectetur</p>

CSS:

  1. p:empty{border:1px dashed red;padding:10px}

Output:

Lorem ipsum dolor sit amet, consectetur

Lorem ipsum dolor sit amet, consectetur

In the example, the second paragraph should have a red dashed border (and some padding to avoid collapsing in the example).