Complete CSS Selector Reference
Specify a background color for empty p elements:
The :empty selector matches every element that has no children (including text nodes).
![]()
The :empty selector is supported in all major browsers, except IE8 and earlier.
Complete CSS Selector Reference
Your message has been sent to W3Schools.