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.
Loading...
Related Quiz
- An internal document link targets an element with a specific _____ to navigate within the same page.
- You are developing a complex multi-level navigation menu. How would you ensure that it is both keyboard-friendly and accessible to screen reader users?
- What is the significance of the type attribute in a source tag within an audio or video tag?
- You're developing a webpage where clicking on a product image should navigate to the product's detailed view in a new tab, ensuring the original page remains open. How would you implement this using anchor tags and target attributes?
- The _______ element represents a citation or reference to a creative work.