Styling links

Recipe 3.2 Style links

Sample:

O'Reilly books and videos

Code:

<style>
   a:link {
    color: blue;
    text-decoration: underline;
  }
  
   a:visited {
    color: rebeccapurple;
  }

   a:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
  }
  
   a:hover {
    text-decoration: none;
  }

   a:active {
    color: red;
  }
</style>

<p>
  <!-- Link to an external site -->
  <a href="https://www.oreilly.com/products/books-videos.html">
    O'Reilly books and videos
  </a>
</p>