Definition and Usage
The :valid CSS pseudo-class represents any <input> element whose content validates correctly according to the input’s type setting. This allows to easily make valid fields adopt an appearance that helps the user confirm that their data is formatted properly.
Examples
See :invalid for an example.
Compatibility
Desktop browsers
| Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
|---|---|---|---|---|---|
| Basic support | 10.0 | 4.0 (2) | 10 | 10.0 | 5.0 |
Mobile browsers
| Feature | Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
|---|---|---|---|---|---|
| Basic support | NA | 4.0 (2) | Not supported | 10.0 | 5.0 |







