I was trying pseudo code for an anchor tag in css, i.e. link, visited, hover and active. The html is:
<a href="https://www.w3schools.com/html/" target="_blank">
w3school
</a>
and the css is:
a:link {
color: blue;
text-decoration: overline underline;
}
a:visited {
color: green;
text-decoration: line-through;
}
a:hover {
color: red;
text-decoration: underline;
}
a:active {
color: black;
text-decoration: overline;
}
After being visited, the text color is green which is correct. However, the text decoration is overline and underline, not line-through:visited is partially working. It seems that color is cascaded and text decoration not. Could someone explain this?