:focus

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

Explanation: The pseudo-class that targets an element when it receives focus, such as when a user clicks on an input field or navigates to it using the keyboard. It's used to style elements to indicate that they are active or ready for interaction, often changing their appearance to help users identify the focused element.

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