The :empty pseudo selector in CSS
When you want to style some empty elements in HTML, you can use the :empty selector.
Example: May be you wish to hide those empty paragraphs so that they would not mess up the spacing of the surrounding elements.
#
One cautionIf you think about it, if the element itself has even a single space inside it, this selector will not work.
Works: <p></p>
Does not work: <p> </p>