CSS Selector Level 4 » Blank pseudo-class

This blank pseudo-class selects user inputs without any content. If you are looking to match empty elements, :empty is the corresponding selector.

# Syntax

:blank {
    /* declarations */

# Example

:blank {
    border: 2px solid yellow;

In this example just the second textarea and the second input will get matched as it has no 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)

Due to an extreme price increase of our statistics provider the data collection was stopped in September 2018.

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