CSS :link
The :link pseudo-class selects links that have not been visited by the user. It applies to anchors with an href attribute before the browser marks them as visited.
Syntax
a:link {
color: #2563eb;
}
Example
a:link {
color: #2563eb;
}
a:visited {
color: #7c3aed;
}
a:hover {
text-decoration-thickness: 0.12em;
}
This lets you style unvisited and visited links differently. Keep the difference clear enough to help users, but do not rely on visited state for critical information.
Recommended order
When styling link states, a common order is :link, :visited, :hover, :active. The order matters because several states can apply to the same link.