CSS hover Selector (:hover)

What is CSS :hover Selector?

CSS :hover selector occur when user perform mouse hover action over element.
Now a day CSS :hover selector support not only <a> element but also support all other element.


General syntax of CSS :hover selector,

:hover {
  property: value;
  property: value;

a:hover {
  property: value;
  property: value;


CSS :hover selector occur when user mouse hover action perform over element.

<!DOCTYPE html>
  <title>CSS :hover Selector</title>
  <style type="text/css">
    a:hover {
       color: orange;
  <a href="#">First</a>

Run it...   »

Browser Compatibility

  • Google Chrome 2+
  • Mozilla Firefox 1+
  • Internet Explorer 7+
  • Opera 7+
  • Safari 1.3+

Note: Here details of browser compatibility with version number may be this is bug and not supported. But recommended to always use latest Web browser.