Skip to main content

How to Link to a Specific Part of a Web Page

A hand pointing at highlighted text on a screen

Short answer: The cleanest way today is a text fragment. Add #:~:text= plus the words you want to the end of a URL, and the browser scrolls to and highlights that exact text. In Chrome you can generate one automatically by right-clicking a selection and choosing "Copy Link to Highlight."

I often want to send someone a long article but point them at one paragraph. The old annotation apps I used to recommend have faded, and browsers now do this natively, which is faster and needs no third-party service.

What is a text fragment and how do I make one?

A text fragment is a special piece you append to a URL that tells the browser which words to find and highlight. The format looks like this:

https://example.com/article#:~:text=the%20exact%20phrase

The easiest way to create one is not to type it by hand:

  1. In Chrome, Edge, or Safari, select the sentence you care about on the page.
  2. Right-click the selection.
  3. Choose Copy Link to Highlight (Chrome and Edge) or Copy Link with Highlight (Safari).
  4. Paste the link anywhere. When someone opens it, the browser jumps to that text and highlights it.

Behind the scenes this uses the Text Fragments feature. To target a range you can include start and end: #:~:text=start,end links a whole span from the start phrase to the end phrase.

How do anchor links differ?

Anchor links point to an element the page author gave an id to. If a heading has id="pricing", then https://example.com/page#pricing jumps straight to it. Many sites add these to headings automatically, so hovering a heading often reveals a link icon you can copy. The difference: anchors need the page to have defined the id, whereas text fragments work on any text without the author doing anything.

Which method should I use?

MethodWorks whenHighlights text?Needs page support?
Text fragment (#:~:text=)Any specific words on the pageYesNo
Anchor link (#id)The section has an idNo, just scrollsYes
Author-provided heading linkSite adds anchor iconsNoYes

How do I add my own anchors to a page I control?

If I am writing HTML, I give the target element an id and link to it. I set <h2 id="setup">Setup</h2> and then link with <a href="#setup">Jump to setup</a>. That same URL with #setup on the end works when shared externally too.

What is the tip most guides miss?

Text fragments can break if the wording is common or repeats on the page. My fix is to select a slightly longer, more unique sentence so the browser lands on the right spot. Also, a fragment fails silently if the site later edits that text, so for anything you need to stay permanent, capture the page in a service like the Wayback Machine first and share the archived URL with the fragment appended. That way the citation survives even if the original page changes.

Frequently asked questions

Do text fragment links work in every browser?

They work in Chrome, Edge, Safari, and other Chromium-based browsers, and Firefox now supports opening them. A browser that does not understand the fragment simply loads the page normally without the highlight.

Why does my text fragment not highlight anything?

Usually the wording no longer matches the page, the phrase is not unique, or special characters were not encoded. Select a longer, unique sentence and regenerate the link with the browser's copy option.

Can I link to a specific part of a PDF?

Yes for pages: append #page=5 to a PDF URL to open at page five in most viewers. Highlighting exact text inside a PDF is not universally supported the way text fragments are on web pages.

What is the difference between an anchor and a text fragment?

An anchor jumps to an element the author gave an id and does not highlight. A text fragment finds and highlights any words you specify and needs no cooperation from the page author.

Comments

Popular posts from this blog

How to Completely Uninstall Programs on Windows (Free Tools and Tips)

Short answer: you do not need a cracked Revo Uninstaller Pro, because Revo has a capable free version and there are free open-source alternatives that remove programs completely, leftover files and registry entries included. Here is how to uninstall cleanly and why leftovers matter. Why leftovers are a problem Windows' built-in uninstaller often leaves behind folders, registry keys and startup entries. Over time these accumulate, clutter your system, and occasionally cause conflicts when you reinstall software. A dedicated uninstaller sweeps them up. Free tools that remove programs completely Revo Uninstaller Free , uninstalls the program, then scans for and removes leftover files and registry entries. The free version covers what most people need. Bulk Crap Uninstaller , free, open source, and excellent for removing many programs at once and cleaning leftovers. How to uninstall cleanly with Revo Free Open Revo and select the program. Click Uninstall; let the progra...

How to Recover Deleted Files for Free (Better Than a Cracked Tool)

Short answer: you do not need a cracked 7-Data Recovery serial, because excellent free tools like Recuva and PhotoRec recover deleted files, and the most important factor is not the software at all, it is stopping use of the drive immediately. Here is how to recover files the safe, effective way. The one rule that decides success: stop using the drive When you delete a file, the data is not erased, the space is just marked reusable. The moment you keep saving new files, you risk overwriting the deleted data permanently. So the instant you realize something is gone: stop using that drive . Do not install recovery software onto it either, download it to a different drive or USB stick. The best free recovery tools Recuva , free, friendly, great for recovering deleted documents, photos and files from Windows drives and USB sticks. PhotoRec , free and open source, extremely powerful, especially for photos and media, though its interface is basic. Windows File History / backups , ...

How to Transfer Contacts Between Phones the Easy Way (2026)

Short answer: The easiest way to move contacts is to sync them to a cloud account first. Save contacts to your Google account on Android or iCloud on iPhone, then sign in to that same account on the new phone and they appear automatically. For everything else, export a vCard (.vcf) file and import it. Every time I set up a new phone the very first thing I want back is my contacts. Years ago this meant fiddly SIM copies and desktop software. These days I almost never touch a cable. Here are the modern methods I actually use, ranked from easiest to most manual. Method 1: Google account sync (best for Android) If your contacts are saved to your Google account rather than the phone itself, switching Android phones is basically automatic. On the old phone, open Settings > Accounts > Google and confirm Contacts sync is on. Wait a minute for the sync to finish, or tap the three-dot menu and choose Sync now . On the new phone, sign in with the same Google account during setup....