codegurukool.com · Free coding tutorials & online compiler

Home › CSS Tutorial › CSS links

CSS links

Style all four link states.

Order matters: a:link, a:visited, a:hover, a:active.

Example code

<style>
a:link{color:#2e86de}a:visited{color:purple}
a:hover{color:tomato;text-decoration:none}a:active{color:black}
</style>
<a href='#x'>Hover over me</a>

Run this code in the online editor

← CSS iconsCSS lists →