HTML CSS examples for CSS Widget:Color
Set different color for link in its four states
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> /* unvisited link */ a:link { color: #FF0000; } /* visited link */ a:visited {<!--from w w w .ja v a 2s . c om--> color: #00FF00; } /* mouse over link */ a:hover { color: red; } /* selected link */ a:active { color: #0000FF; } </style> </head> <body> <p> <b> <a href="#" target="_blank">This is a link</a> </b> </p> </body> </html>