Skip to main content

Google’s new Chrome extension lets you link directly to specific text on a page

Google’s new Chrome extension lets you link directly to specific text on a page

/

An easier way to use Chrome’s Text Fragment feature

Share this story

The extension links to specific text on a web page, highlighted yellow.
The extension links to specific text on a web page, highlighted yellow.
Screenshot: Web.Dev

Link to Text Fragment is a new Chrome Extension from Google that lets you generate URLs to specific text on a webpage, regardless of the page’s formatting.

With the extension installed, simply highlight the text you want to link to, right click, and select “Copy Link to Selected Text.” This can then be shared and opened by anyone using a compatible browser. For example, clicking this link in Chrome or Edge will bring you directly to a highlighted section at the bottom of the article.

The Google extension builds upon a new feature that was recently added to Chromium called Text Fragments, which works by appending extra linking information to a URL after a #. It’s the same technology that Google now sometimes uses to link to specific parts of a webpage in search results. However, these URLs can be long and difficult to manually create if you’re linking to longer sections of text, or complex web pages where the same words are repeated multiple times. This extension simplifies the creation process.

The links created by the extension are compatible with version 80 upwards of all Chromium-based browsers, but they’re not supported in all browsers. Google’s blog post notes that as of yesterday Firefox and Safari had not said that they’d implement the feature. Clicking a link using those browsers will simply take you to the top of the linked webpage, without highlighting the text.

Text fragments are a small but useful piece of functionality that make it easier to find specific information on a webpage. In the paragraph above, for example, the hyperlink to Google’s blog post is set up to link directly to the section about Firefox and Safari compatibility. You could also see it being useful for linking to a specific step in a long series of instructions, or a particular entry in a best-of list. 

The extension and the functionality it enables are promising, but it’s not perfect just yet. While testing out the feature in Edge, I’d sometimes get linked to the correct part of the page, but the text wouldn’t be highlighted. Then, when creating links, I’d sometimes receive an error telling me to highlight a longer section of text, despite having already selected a whole paragraph. I wasn’t able to verify what it was about my combination of browser, extensions, and the websites I was linking to that caused these problems.

The Link to Text Fragment extension is available now in the Chrome Web Store.