:target

The :target pseudo selector in CSS matches when the hash in the URL and the id of an element are […]

.element:target { background: yellow; }
Continue Reading

:target-current

The :target-current CSS pseudo-class selects active scroll markers, meaning it’s only valid when used with the ::scroll-marker pseudo-element

::scroll-marker:target-current { background: black; }
Continue Reading

::target-text

The ::target-text pseudo-element selects a text fragment, usually the ones created by search engines.

p::target-text { /* ... */ }
Continue Reading