:any-link

Matches any element that is an anchor with an 'href' attribute, regardless of whether it has been visited. It's a cleaner way to style all links without having to list ':link' and ':visited' separately.

Quick example

nav a:any-link {
  color: #7c3aed;
  text-decoration: none;
}

:any-link Browser Support

Widely available Since 2020 95% global usage

This feature is well established and works across many devices and browser versions. It has been available across browsers since 2020.

Safe to use without fallbacks.

65+
50+
9+
79+
ESC