Construct HTML document to set different colours to visited/unvisited links, Specify a
background colour for links



Input


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

/* visited link */
a:visited {
  color: green;
  background-color: red;
}
</style>
</head>
<body>

<p><h1><a href="corona.jpeg" target="_blank">This is a link</h1></b></p>
</body>
</html>




Output

This is the Unvisited link
This is the visited link

No comments:

Post a Comment