EN
CSS - change visited link style
0 points
In this short article, we would like to show how to change the visited link style using CSS.
Quick solution:
xxxxxxxxxx
1
a:visited {
2
color: red;
3
}
You can create your own style for links that the user has already visited using the :visited
CSS pseudo-class.
In this example, we change the color of a
element to red
if the user has already visited it.
xxxxxxxxxx
1
2
<html>
3
<head>
4
<style>
5
6
a:visited {
7
color: red;
8
}
9
10
</style>
11
</head>
12
<body>
13
<a href="https://www.dirask.com/">Visit the link to change its style.</a>
14
</body>
15
</html>