Set the color for unvisited links to "red", and the color for visited links "blue". - HTML CSS CSS

HTML CSS examples for CSS:Quiz

Description

Set the color for unvisited links to "red", and the color for visited links "blue".

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<head>
<style>
/* unvisited link */
a:link {
    color: red;
}

/* visited link */
a:visited {<!--from  w ww . jav  a 2s  . c om-->
    color: blue;
}

/* mouse over link */
a:hover {
    color: black;
}

/* selected link */
a:active {
    color: green;
}
</style>
</head>
<body>

<h1>This is a Heading</h1>
<p>This is a paragraph.</p>
<p><a href="http://book2s.com">book2s.com</a></p>

</body>
</html>

Related Tutorials