CSS - :any-link

The :any-link CSS pseudo-class 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> elements with an href attribute. So, it matches all elements that match :link or :visited.

Example

: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>

Syntax  

:any-link( style properties ) { style properties }

Description  

The :any-link CSS pseudo-class 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> elements with an href attribute. So, it matches all elements that match :link or :visited.

Browser Compatibility  

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support ? (Yes)-moz
50.0 (50.0)
? ? ?
Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support ? (Yes)-moz
50.0 (50.0)
? ? ?

Specifications  

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

License

© 2016 Mozilla Contributors
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-us/docs/web/css/:any-link