coderef

Link selectorsBaseline · Widely available

The :link CSS pseudo-class matches unvisited links, :visited matches visited links, and :any-link matches both.

Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Jan 15, 2020. Widely available since Jul 15, 2022.

Browser support

DesktopChrome
1–64Not supported
65+Supportedsince Mar 6, 2018
Current: 155
Edge
12–18Not supported
79+Supportedsince Jan 15, 2020
Current: 154
Firefox
1–49Not supported
50+Supportedsince Nov 15, 2016
Current: 157
Safari
1–8Not supported
9+Supportedsince Sep 30, 2015
Current: 27
MobileChrome Android
18–64Not supported
65+Supportedsince Mar 6, 2018
Current: 155
Firefox Android
4–49Not supported
50+Supportedsince Nov 15, 2016
Current: 157
Safari iOS
1–8Not supported
9+Supportedsince Sep 16, 2015
Current: 27

How to use

This feature is Baseline widely available — use it freely, no fallback needed.

Example

Full syntax and examples are on MDN: :any-link.

Feature detection

CSS · check before using
@supports selector(:any-link) {
  /* styles that use :any-link */
}

/* or in JavaScript */
if (CSS.supports("selector(:any-link)")) {
  // use it
}

Sub-features

Support for each part of the feature (7). The overall table above shows when the whole feature works.

Sub-featureChromeEdgeFirefoxSafariChrome AndroidFirefox AndroidSafari iOS
any-link657950965509
any-link.not_match_link65798715658715
link112111843.2
link.not_match_link1128715188715
visited112111841
visited.not_match_link1128715188715
visited.privacy_measures612451844.2