The :empty pseudo-class finds any element that has no children. Elements and text (including spaces) are counted. Comments will not affect the element being treated as non-empty.
:empty
element:empty { property: value; }