Style all unvisited links with CSS


To style all unvisited links, use the CSS :link selector. You can try to run the following code to implement the :link selector:

Example

Live Demo

<!DOCTYPE html>
<html>
   <head>
      <style>
         a:link {
            background-color: orange;
         }
      </style>
   </head>
   <body>
      <a href = "https://www.example.com">Demo Website</a>https://www.example.com/
   </body>
</html>

Updated on: 30-Jun-2020

536 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements