MDN wants to learn about developers like you: https://qsurvey.mozilla.com/s3/MDN-dev-survey

The :any-link CSS pseudo-class selector represents an element that acts as the source anchor of a hyperlink independent of whether it has been visited, that is, it matches every <a>, <area>, or <link> element with an href attribute. Thus, it matches all elements that match :link or :visited.

/* Select any elements that would be matched by :link or :visited */
/* currently supported with -moz- and -webkit- prefixes */
:-moz-any-link {
  color: green;
  font-weight: bold;
}

:-webkit-any-link {
  color: green;
  font-weight: bold;
}

Syntax

:any-link

Examples

:any-link {
  color: green;
  font-weight: bold;
}

:-moz-any-link {
  color: green;
  font-weight: bold;
}

:-webkit-any-link {
  color: green;
  font-weight: bold;
}
<a href="https://mozilla.org">Different page</a>
<a href="#">Anchor</a>
<map name="primary">
  <area shape="circle" coords="50,50,25" href="another.html" /> 
  <area shape="default" nohref />
</map>

Result

Specifications

Specification Status Comment
Selectors Level 4
The definition of ':any-link' in that specification.
Working Draft Initial definition.

Browser compatibility

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic Support(Yes) -webkit- No

(Yes) -moz-

50.0

No(Yes) -webkit- (Yes) -webkit-
FeatureAndroidChrome for AndroidEdge mobileFirefox for AndroidIE mobileOpera AndroidiOS Safari
Basic Support(Yes) -webkit- (Yes) -webkit- No

(Yes) -moz-

50.0

No(Yes) -webkit- (Yes) -webkit-

Document Tags and Contributors

 Contributors to this page: mfluehr, chrisdavidmills, fscholz, bradleesand, Sebastianz
 Last updated by: mfluehr,