Join MDN and developers like you at Mozilla's View Source conference, 12-14 September in Berlin, Germany. Learn more at



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.


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


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


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

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)
? ? ?

Document Tags and Contributors

 Contributors to this page: Sebastianz
 Last updated by: Sebastianz,