/* Selects any <a> that links to the current document */
a:local-link {
color: green;
}`:local-link` CSS pseudo-class / notebook
`:local-link` CSS pseudo-class
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
:local-link {
/* ... */
}<a href="#target">This is a link on the current page.</a><br />
<a href="https://example.com">This is an external link</a><br />a:local-link {
color: green;
}