:visited
In this chapter you will learn:
Description
The :visited
selector selects visited links.
Example
<!DOCTYPE HTML> <!--from ja va 2 s . co m-->
<html>
<head>
<title>Example</title>
<style type="text/css">
:link {
border: thin black solid;
background-color: lightgrey;
padding: 4px;
color:red;
}
:visited {
background-color: grey;
color:white;
}
</style>
</head>
<body>
<a href="http://java2s.com">Visit the java2s.com</a>
<a href="http://w3c.org">Visit the W3C website</a>
</body>
</html>
Only some properties can be applied to links using the :visited selector. You can change the colors and the font.
Next chapter...
What you will learn in the next chapter:
Home » HTML CSS Tutorial » CSS Selector Reference