Style Links on Mouse Over with CSS



To style links on mouse over with CSS, use the CSS: hover selector. You can try to run the following code to implement the: hover, selector,

Example

Live Demo

<!DOCTYPE html>
<html>
   <head>
      <style>
         a:hover {
            background-color: orange;
         }
      </style>
   </head>
   <body>
      <a href = "https://www.google.com">Google</a>
      <p>Keep the mouse cursor on the above link and see the effect.</p>
   </body>
</html>
Updated on: 2020-06-30T11:11:46+05:30

244 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements