Skip to main content

Reading and extraction

Text fragment

Also called Scroll-to-text fragment, #:~:text=

A text fragment is a URL suffix in the form #:~:text=quoted%20words that tells a browser to scroll to a specific passage on a page and highlight it. It links to a sentence rather than to a page or a manually placed anchor.

Syntax and support

The basic form is #:~:text=start, with an optional end for a range: #:~:text=start,end. Prefix and suffix terms can disambiguate a phrase that appears several times. Chromium browsers and Safari support it; support elsewhere has been slower, and unsupported browsers simply load the page normally.

Because the fragment is processed by the browser and never sent to the server, the publisher does not see the quoted passage and cannot use it for tracking.

Why quote links break

Matching is on exact text. Corrections, a changed dash, a normalized quotation mark, or a paywall overlay that removes the passage all cause the link to fall back to the top of the page. Durable quote linking therefore needs a stored copy of the text, not only a fragment.

In smry

smry stores highlights against the retrieved article text, so a shared quote resolves to the same passage even when the source page changes underneath it.

Common questions

Why does my text fragment link jump to the top of the page?

The quoted text no longer matches exactly. Edits, punctuation normalization, or content hidden behind an overlay are the usual causes.

Do text fragments work in every browser?

Chromium browsers and Safari handle them. Browsers without support ignore the fragment and load the page as usual.

Related terms

See also