Set the link color with CSS


Use the :link class to set the link color. Possible values could be any color name in any valid format. 

Example

You can try to run the following code to set link color −

<html>
   <head>
      <style>
         a:link {
            color:#FF0000
         }
      </style>
   </head>
   <body>
      <a href = "">Demo Link</a>
   </body>
</html>

Lakshmi Srinivas
Lakshmi Srinivas

Programmer / Analyst / Technician

Updated on: 04-Mar-2020

238 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements