Role of CSS :link Selector



Use the CSS :link selector to style all unvisited links. 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: 2020-06-30T11:16:36+05:30

217 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements