Web platform features explorer

:placeholder-shown

Widely available since 2022-07-15
Tags: css Groups: CSS > Selectors

The :placeholder-shown CSS pseudo-element selects <input> and <textarea> elements when no value is set and the element's placeholder attribute is not empty. Not to be confused with ::placeholder, which selects the placeholder text itself.

Browser support (view on caniuse.com)

  • Chrome 47 Released on 2015-12-01
  • Chrome Android 47 Released on 2015-12-02
  • Edge 79 Released on 2020-01-15
  • Firefox 51 Released on 2017-01-24
  • Firefox for Android 51 Released on 2017-01-24
  • Safari 9 Released on 2015-09-30
  • Safari on iOS 9 Released on 2015-09-16