:any-link - CSS Selector
Summary of characteristics of the :any-link selector
href attribute.Description of the :any-link pseudo-class.
:any-link refers to elements that have an href attribute, that is, the a and area tags, whether these links
have been visited or not. For example, :any-link makes writing easier in the case of combined selectors:
Target all the links of the element id="edito"
#edito :link, #edito :visited { ... }
Can be simplified by using :any-link
#edito :any-link { ... }
Example of use of the pseudo-class :any-link.
Basic use of :any-link.
The pseudo-class :any-link is primarily useful for targeting all links, whether they have been visited or not. The example below shows that
both links (visited and unvisited) are targeted by the same rule.
Using :any-link on area tags.
Here’s another example of using :any-link: the image below has area type links. On some browsers (like ),
this feature isn’t implemented.
Browser compatibility with :any-link.
The pseudo-class :any-link is now properly recognized by browsers, except for area type links that still doesn't
know how to handle (2026).
any-link pseudo-class, which targets all links, visited or not.:any-linkpseudo-class
Browsers on computers :
Mobile browsers :
Outdated or marginal browsers :

Internet Explorer

QQ Browser

Safari sur IOS

Firefox pour Androïd

Opéra Mobile

Baidu Browser

KaiOS Browser

UC Browser pour Androïd

Opéra

Safari

Firefox

Chrome pour Androïd

Samsung Internet

Chrome

Edge

Androïd Brower

Opéra mini
Historic of the :any-link pseudo-class.
-
Selectors Level 4
This specification module defines new selectors that can be used in CSS.
Regarding:any-linkIntroduction of the:any-linkpseudo-class.September 29, 2011Working Draft.
See also...
Several pseudo-classes allow you to target links on a page, or parts of a page specified by the URL (bookmark). Check the pages describing the selectors below to complete your information.
href attribute.





