:invalid

Term side of the Card
Topic: Pseudo Classes
Unit title: :invalid
Categories: Pseudo-class
Explanation side of the Card

Explanation: The pseudo-class that applies styles to form elements when their value doesn't match the required format or constraints, like an incorrect email address or an empty required field. It helps indicate to users that their input needs correction.

Browser compatibility:
  • The chrome browser supports this feature starting from version 10
  • The edge browser supports this feature starting from version 12
  • The firefox browser supports this feature starting from version 4
  • The safari browser supports this feature starting from version 5
Availability: