-
Notifications
You must be signed in to change notification settings - Fork 756
Description
I think this information is not entirely correct:
For example, in HTML5, any
<a>or<area>elements are hyperlinks, and thus match:any-link.
Link to section: https://drafts.csswg.org/selectors/#the-any-link-pseudo
According to the HTML Standard, the <a> and <area> elements are only then hyperlinks if they have an href attribute.
If the
<a>element has anhrefattribute, then it represents a hyperlink (a hypertext anchor) labeled by its contents. If the<a>element has nohrefattribute, then the element represents a placeholder…
Source: https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-a-element
Browsers follow this definition. In browsers, the :any-link selector matches <a href="#">foo</a> but not <a>foo</a>. Therefore, the CSS spec should say “any <a> or <area> elements with href attributes are hyperlinks”.