:local-link - CSS Selector
Summary of characteristics of the :local-link selector
:local-link pseudo-class - Description.
The pseudo-class :local-link âš refers to links that point to the same domain as the page they're on.
For now, this selector is poorly supported by browsers (2026).
The result should look like this (this is a simulation). The pseudo-class :local-link lets us automatically add a little symbol ( đź”— ) to external links.
This link points to another
page of this site index.
This link points to the
homepage of đź”— Google.
:local-link pseudo-class - Examples of use.
Below, the two examples shown make a distinction between local links (same domain) and external links (different domains) by adding the đź”—
character before external links. More specifically, we add the symbol to all links and remove it for local links.
This example will only work on browsers that recognize the pseudo-class :local-link.
:local-link pseudo-class - Browser compatibility
The pseudo-class :local-link isn't supported by browsers yet (2026).
:local-link pseudo-class - Historic.
-
Selectors Level 4
This specification module defines new selectors that can be used in CSS.
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.





