Local Link
The :local-link pseudo-class represents a hyperlink within the current site.
Browser Support
Desktop
Mobile
Syntax
E:local-link {
/* Declarations */
}
Example
/* In the following example, all hyperlinks within your site (local links) will be blue. */
a:local-link {
color: blue;
}
/* In the following example, all external links will have a common icon, telling the user that the link is external. */
:not(:local-link) {
background: url(external-link.png) 0 0 no-repeat;
}
Information is based on Selectors Level 4 - W3C Working Draft (last updated on May 2, 2013)
Copyright © 2013 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved. W3C liability, trademark and document use rules apply.