Tag bookmarklet

1 bookmark has this tag.

2024-08-09

7211.

How To: Highlight Text Fragments When Linking

weblog.rogueamoeba.com/2024/08/08/how-to-highlight-text-fragments-when-linking

A highlighted result
In recent months, I’ve begun to notice that results from web searches often highlight specific text on the page to which they’re linking. The web page is also scrolled to the relevant content. It’s quite helpful!

A quick investigation showed this is accomplished by appending a bit of code, #:~:text= to the URL for a link. These are called Text Fragments, and they’ve been supported by Chrome since back in 2020. It took a couple more years for support to come to Safari, but at this point, the element is well-supported enough to be worth using