Style the active link with CSS

CSSWeb DevelopmentFront End Technology

To style the active links, use the CSS :active selector. You can try to run the following code to style the active links

Example

Live Demo

<!DOCTYPE html>
<html>
   <head>
      <style>
         a:active {
            background-color: green;
         }
      </style>
   </head>
   <body>
      <a href = "https://qries.com">Welcome to Qries</a>
      <p>Click on the above link to see the effect.</p>
   </body>
</html>
raja
Published on 08-May-2018 16:20:09
Advertisements