Links have four states you can style:
| Selector | When |
|---|---|
a:link |
normal, not visited |
a:visited |
already visited |
a:hover |
mouse is over it |
a:active |
being clicked |
Write them in this order: LoVe HAte — link, visited, hover, active.
Remove underline
a { text-decoration: none; } — but keep links clearly different from normal text (colour, weight or underline on hover).
Example
Example — Link states and button links
HTML
<style>
a { color: #1f6feb; text-decoration: none; }
a:hover { text-decoration: underline; }
a:active { color: crimson; }
.btn { display: inline-block; background: #1f386b; color: white; padding: 10px 18px; border-radius: 6px; }
.btn:hover { background: #2d4f94; text-decoration: none; }
</style>
<p><a href="#">Hover over this link</a></p>
<a class="btn" href="#">Button-style link</a>