pseudo-class
:any-link — CSS reference
Matches hyperlinks regardless of visited state. An anchor without href is not a hyperlink.
Formal Syntax & Structure
css syntaxcss
:any-linkWorking Example
Example Snippetcss
<!doctype html><html lang="en"><head><meta charset="utf-8"><title>Selector lab</title><style>:where(.sample) { color: rgb(32, 32, 32); }a:any-link { color: rgb(0, 96, 80); }</style></head><body><a id="a" class="sample" href="#local">A</a><a id="b" class="sample">B</a></body></html>