: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
“We ought to take outdoor walks in order that the mind may be strengthened and refreshed by the open air and much breathing.".
Seneca
Random CSS Property

backdrop-filter

The backdrop-filter CSS property lets you apply graphical effects such as blurring or color shifting to the area behind an element. Because it applies to everything behind the element, to see the effect you must make the element or its background at least partially transparent.
backdrop-filter css reference