Background Color

The background-color property specifies the background color for links:

HTML file: Displayed by browser:
<style>
a:link {     background-color: #B2FF99; } /* light green */
a:visited { background-color: #FFFF85; } /* yellow */
a:hover { background-color: #FF704D; } /* orange red */
a:active { background-color: #FF704D; } /* orange red */
</style>
<body>
<p><b><a href="text_hey.html" target="_blank">Do NOT click on this unvisited page!</a></b></p>
<p><b><a href="index.html" target="_blank">Click on this link to see the changes.</a></b></p>
<p><b>Note:</b> a:hover MUST come after a:link and a:visited in the CSS definition in order to be effective.</p>
<p><b>Note:</b> a:active MUST come after a:hover in the CSS definition in order to be effective.</p>
</body>

Do NOT click on this unvisited link!

Click on this link to see the changes.

Note: a:hover MUST come after a:link and a:visited in the CSS definition in order to be effective.

Note: a:active MUST come after a:hover in the CSS definition in order to be effective.


Back button Table of Contents Next button