:blank
Quick Summary for :blank
Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
Code Usage for :blank
<textarea></textarea> 
More Details for :blank

:blank

Experimental: This is an experimental technologyCheck 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. <input> or <textarea>).

Syntax

:blank

Examples

Simple :blank example

In eventual supporting browsers, the :blank pseudo-class will enable developers to highlight in some way input controls that are not required, but still have no content filled in, perhaps as a reminder to users.

HTML
<textarea></textarea> 
CSS
textarea:blank {   border: 3px solid red; } 
Result

Specifications

Specification
Selectors Level 4 # blank-pseudo

See also

:empty

Last modified: Aug 12, 2021, by MDN contributors

Select your preferred language English (US)EspañolFrançais日本語Português (do Brasil)中文 (简体) Change language

No Items Found.

Add Comment
Type in a Nick Name here
 
Related Search Terms
Other Categories in CSS
css
Search CSS
Search CSS by entering your search text above.
Welcome

This is my test area for webdev. I keep a collection of code here, mostly for my reference. Also if i find a good link, i usually add it here and then forget about it. more...

Subscribe to weekly updates about things i have added to the site or thought interesting during the last week.

You could also follow me on twitter or not... does anyone even use twitter anymore?

If you found something useful or like my work, you can buy me a coffee here. Mmm Coffee. ☕

❤️👩‍💻🎮

🪦 2000 - 16 Oct 2022 - Boots
Random Quote
For a long time it had seemed to me that life was about to begin - real life. But there was always some obstacle in the way, something to be gotten through first, some unfinished business, time still to be served, or a debt to be paid. Then life would begin. At last it dawned on me that these obstacles were my life.
Alfred D. Souza
Random CSS Property

<image>

The <image> CSS data type represents a two-dimensional image.
image() css reference