Text fragment links

last updated: Oct 10, 2024

https://developer.mozilla.org/en-US/docs/Web/URI/Fragment/Text_fragments

You can append #:~:text=bananas to a URL to highlight the first match of the text bananas on the page that's linked. You can append #:~:text=initio,finito to highlight all text in the first match from initio to finito.

For example, this link with #:~:text=You can't,no one can highlights the phrase You can't predict the future, no one can on the linked page.

The browser will scroll the page to the first instance of the fragment text. This link should take you right to the famous final line of The Great Gatsby.

I'm very excited to use this feature! I wish it'd been around for a long time.

↑ up