<html>
<head>
<style>
a:link {
background-color: yellow;
}
a:visited {
background-color: cyan;
}
a:hover {
background-color: lightgreen;
}
a:active {
background-color: hotpink;
}
</style>
</head>
<body>
<h1>Style a link with background-color</h1>
<p><a href="default.asp" target="_blank">This is a link</a></p>
<p><b>Note:</b> :hover must come after :link and :visited in order to be effective.</p>
<p><b>Note:</b> :active must come after :hover in order to be effective.</p>
</body>
</html>