HTML
CSS
PHP
Deno
Examples
Do It Yourself
Blog
Type in your code below
Run
<html><head><style> /* unvisited link */ a:link { color: #0000FF; } /* moused over link */ a:hover { color: #0000FF; } /* visited link */ a:visited { color: #009F00; } /* clicked link */ a:active { color: #FF0000; } </style> </head><body> <a href="/diy/css-links-basic-example.html">This link show an example of how CSS renders a:link, a:hover, a:active, a:visited, a:active.</a> <ol> <li>Notice the current color (a:link).</li> <li>Hover on the link to see the color (a:hover)</li> <li>Click on the link to see the color before lifting you mouse (a:active)</li> <li>Notice the link color after page reload (a:visited)</li> </ol> *Note a:visited overrides a:hover. </body></html>