Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

How to Link to Text on a Web Page in Chrome and Edge

· 5 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Linking directly to a specific sentence or paragraph on a webpage is incredibly useful when you want to share a particular part of a long article, a key quote, or a specific answer without making the reader scroll and search. Both Google Chrome and Microsoft Edge (which are built on the same Chromium engine) support a feature called "scroll-to-text fragment" that lets you create such links. You don't need any special extensions or software—just the browser and a few clicks. Here's how to do it.

What You'll Need

  • A computer running Google Chrome or Microsoft Edge (the feature works on both Windows and Mac).
  • The web page you want to link to, open in your browser.
  • The ability to right-click (or Ctrl+click on a Mac) and copy text.

Step-by-Step

  1. Open the webpage in Chrome or Edge that contains the text you want to link to. Make sure the page has fully loaded.
  2. Select the exact text you want to highlight. Click and drag your mouse over the sentence or phrase. You can select a single word or a whole paragraph, but keep it reasonably short—a few words to a couple of sentences works best.
  3. Right-click on the highlighted text. A context menu will appear. (On a Mac, press Ctrl and click, or use two-finger tap on a trackpad.)
  4. Choose "Copy link to highlight". In Chrome, this option appears as "Copy link to highlight". In Edge, it's labeled "Copy link to highlight" as well. If you don't see this option, make sure you've selected text and that the page is not a special page like the browser's new tab or a PDF viewer.
  5. The link is now on your clipboard. It will look something like this: https://example.com/article#:~:text=exact%20text%20you%20selected. The part after #:~:text= is the special fragment that tells the browser to scroll to and highlight that text.
  6. Paste the link wherever you want to share it—an email, a chat message, a document, or a social media post. The recipient can click it and, if they use Chrome or Edge, they'll be taken directly to that text, which will be briefly highlighted in yellow.

Common Mistakes

  • Not selecting any text: If you right-click without selecting text, the "Copy link to highlight" option won't appear. You must highlight something first.
  • Selecting too much text: Very long selections (e.g., an entire page) may not work because the URL becomes too long or the browser can't match it. Stick to a few sentences.
  • Using the wrong browser: The feature works in Chrome and Edge, but not in all browsers (e.g., older versions of Safari or Firefox). If you test it in a browser that doesn't support it, the link will just open the page without highlighting.
  • Copying the link from the address bar instead: The address bar shows the plain URL without the text fragment. You must use the "Copy link to highlight" option from the right-click menu, not copy the URL manually.

Tips

  • Keep the selection short and unique: If you select common words like "the" or "and", the browser might highlight the first occurrence, not the one you intended. Choose a distinctive phrase.
  • You can manually edit the link: If you understand the structure, you can adjust the text in the URL. For example, you can change the text after #:~:text= to match a different part of the page. Spaces are replaced with %20 or you can use hyphens. However, it's easier to just re-copy.
  • Use it for citations: When referencing a source, a text-fragment link helps your reader verify the exact quote without scrolling.
  • It works on mobile too: On Android Chrome, you can select text and choose "Copy link to highlight" from the menu. On iOS, support is more limited, but you can still manually construct the URL.

Troubleshooting

If the link doesn't work as expected, try these steps:

  • Check that you're using a supported browser: Open the link in Chrome or Edge. If you're using an older version, update the browser to the latest version.
  • Make sure the text is still on the page: If the webpage has been updated and the text no longer exists, the link will just open the page at the top. The feature only works if the exact text is present.
  • Verify the URL: Look at the link you copied. It should contain #:~:text=. If it doesn't, you likely copied the plain URL instead of using the "Copy link to highlight" option.
  • Try a shorter selection: If the link opens the page but doesn't scroll, the text might be too long or contain special characters that confuse the matching. Select a shorter phrase and try again.
  • Check for special characters: If your selected text includes punctuation like commas, periods, or quotes, they are URL-encoded automatically. If you manually edit the link, make sure to encode them properly (e.g., a comma is %2C).

Frequently Asked Questions

Does this work in all browsers?

No. The scroll-to-text fragment feature is supported in Chrome, Edge, and other Chromium-based browsers (like Brave and Opera). Safari and Firefox have partial or no support, so the link will open the page but won't highlight the text.

Can I link to text on a page that requires a login?

Yes, as long as the text is visible in the page's HTML after you log in. The link will work for anyone who has access to that page and is logged in.

What if the text I want to link to is inside an image or a PDF?

The feature only works for text that is part of the HTML content. Text inside images is not selectable, and PDFs have their own viewer that may not support this feature.

Can I link to multiple pieces of text on the same page?

Yes, you can create a link that highlights multiple text fragments by separating them with the & symbol in the URL. For example: #:~:text=first%20text&text=second%20text. However, this is not available through the right-click menu—you'd have to manually edit the URL.

Does the highlighted text remain highlighted after I click the link?

Yes, the text is highlighted in yellow for a few seconds after the page loads, then the highlight fades. The browser scrolls to the text immediately.

Can I use this on a mobile device?

On Android Chrome, you can select text and choose "Copy link to highlight" from the menu. On iOS, the option is not available in the menu, but you can manually add the #:~:text= part to a URL if you know the exact text.