1

Does :hover in css only works on <a> tags? Or it can work on any HTML tags? Thank you.

2 Answers 2

4

It applies to any element, but IE6 and earlier have a bug which only lets it work on links (<a> elements with an href attribute).

Sign up to request clarification or add additional context in comments.

Comments

1

Quirksmode has the answer!.

The summary: IE6 only supports :hover on links. Everyone else supports them everywhere.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.