CSS Selector Level 4 » Local link pseudo-class

This pseudo-class is called local link pseudo-class and just matches links whose target URL matches the links own document URL.

# Syntax

:local-link {
    /* declarations */

# Example

nav :local-link {
    color: red;

All links inside the nav element targeting the same URL like the document URL will be red.

Try example in CodePen

# Browser support

Platform Chrome Firefox Safari Edge Internet Explorer Opera
Desktop No No No No No No
Mobile No No No No No No

# Usage statistics (Alexa Top 1,250,000 sites)

Due to an extreme price increase of our statistics provider the data collection was stopped in September 2018.

Please wait a moment, the comments start loading now...
explorermozillachromesafariopera info external