Usage of :active pseudo-class in CSS


The :active pseudo-class is used to add special style to an active element. Possible values could be any color name in any valid format.

Example

<html>
   <head>
      <style>
         a:active {
            color: #FF00CC;
         }
      </style>
   </head>
   <body>
      <a href = "">Click This Link</a>
   </body>
</html>

Samual Sam
Samual Sam

Learning faster. Every day.

Updated on: 04-Mar-2020

61 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements