HTML Link Colors

A link can look different depending on its state.

By default a link is blue when unvisited, purple when visited, and red while active. You can restyle each state with CSS.

  • link — a normal, unvisited link
  • visited — a link the user has already opened
  • hover — while the pointer is over the link
  • active — while the link is being clicked

Styling link states

<!DOCTYPE html>
<html>
<body>

<a href="https://www.hyring.com">Visit Hyring</a>
<style>
  a:link { color: green; }
  a:visited { color: purple; }
  a:hover { color: darkgreen; }
  a:active { color: orange; }
</style>

</body>
</html>