CSS and HTML 5 – Format Hyperlinks

You can format hyperlinks based on whether you’re hovering over them, actively clicking on them, or have visited them. This can be useful when creating dashboards and control panels.


a:link {
	color: blue;

a:hover {
	background-color: yellow;

a:active {
	background-color: red;

a:visited {
	color: grey;


<link rel="stylesheet" href="linkStyle.css" />

<h1> This is a <a href="link.html">LINK</a> example</h1>
<h1> This is a <a href="http://www.cnn.com">LINK</a> example</h1>


Be the first to comment

Leave a Reply