Complete CSS Selector Reference
Select and style a link when you mouse over it:
The :hover selector is used to select elements when you mouse over them.
Tip: The :hover selector can be used on all elements, not only on links.
Tip: Use the :link selector to style links to unvisited pages, the :visited selector to style links to visited pages, and the :active selector to style the active link.
Note: :hover MUST come after :link and :visited (if they are present) in the CSS definition, in order to be effective!
![]()
The :hover selector is supported in all major browsers.
Note: In IE there must be declared a <!DOCTYPE> for the :hover selector to work on other elements than the <a> element.
CSS tutorial: CSS Links
CSS tutorial: CSS Pseudo classes
Select and style unvisited, visited, hover, and active links:
Style links with different styles:
Complete CSS Selector Reference
Your message has been sent to W3Schools.