:blank

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

Note: The :blank selector is considered at risk, as the CSSWG keeps changing it.

See CSSWG issue #1967.

The :blank CSS pseudo-class selects empty user input elements (e.g., or

CSS

css
textarea:blank {
  border: 3px solid red;
}

Result