CSS Selector Level 4 » Blank pseudo-class

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

Syntax

Copy
:blank {
    /* declarations */
}

Example

Copy
: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 500,000 sites)


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