The _____ CSS pseudo-class is used to style an element when it has keyboard focus.

  • :active 
  • :focus 
  • :hover 
  • :visited 
The :focus pseudo-class in CSS is used to add styles to an element when it has keyboard focus. This is particularly important for accessibility to highlight interactive elements like links, buttons, and form fields when they're selected using a keyboard. It helps users know which element they're currently interacting with. 
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *