CSS Selector Level 4 » Blank pseudo-class

This blank pseudo-class behaves like :empty but additionally it will match elements that contain whitespace.

# Syntax

:blank {
    /* declarations */

# Example

:blank {
    border: 2px solid yellow;

In this example just the second paragraph will get matched as it consists of whitespace as content.

Try example in CodePen

# Browser support

Platform Chrome Firefox Safari Edge Internet Explorer Opera
Desktop No No No No No No
Mobile No No No No No No

# Usage statistics (Alexa Top 1,250,000 sites)

Please wait a moment, the comments start loading now...