Core CSS

Link Styling

This CSS reference page displays example code that shows how to style links before and after they are visited and while they are being hovered over or clicked.

LinkStyling.html

<!DOCTYPE html>
<html>
	<head>
		<title>XoaX.net's CSS</title>
		<style>
			/* Before visit */
			a:link {
				color:gray;
			}
			/* After visit */
			a:visited {
				color:blue;
			}
			/* While the cursor is over the link */
			a:hover {
				color:red;
			}
			/* While the button is down with the cursor over the link */
			a:active {
				color:lime;
			}
		</style>
	</head>
	<body>
		<h1>Visit <a href="https://xoax.net/">XoaX.net</a></h1>
	</body>
</html>
 

Output

 
 

© 2007–2025 XoaX.net LLC. All rights reserved.