A text fragment is a special kind of URL that scrolls the browser directly to a quoted passage and highlights it — written as #:~:text= followed by the words to find. When Google's AI Overviews and search results link to a source, they increasingly use text fragments to jump the reader straight to the exact sentence that answered the question. Understanding how they work explains a lot about which pages get cited: assistants prefer content they can point at precisely, and text fragments are the mechanism that makes precise pointing possible.

What a text fragment looks like

The syntax lives after a special :~: delimiter in the URL fragment. A basic fragment is #:~:text=the%20exact%20phrase, which tells the browser to find that phrase on the page, scroll to it, and highlight it. You can target a range with text=start,end — the browser highlights everything from the first phrase to the second — and add context with text=prefix-,match,-suffix to disambiguate when a phrase appears multiple times.

The key property: you don't need to add anything to your HTML for this to work. Text fragments are generated by the linking party — Google, an AI assistant, or a user sharing a "copy link to highlight" — and resolved by the reader's browser. That makes them a signal you influence indirectly, through how you write, rather than a tag you place.

Why AI answer engines love pages they can point at

When an assistant answers a question and attributes it to your page, it wants to link to the precise location of the supporting claim, not just the top of a 3,000-word article. A page written as clear, self-contained statements gives the assistant an unambiguous phrase to target with a text fragment. A page that buries the answer in a meandering paragraph, or splits it across sentences that only make sense together, is harder to point at — and a source that's hard to cite precisely is a source that gets cited less.

This is the same discipline behind passage indexing: write passages that stand on their own. It also connects to how AI chunks your content for retrieval — the cleaner and more quotable your individual statements, the more likely one becomes the highlighted answer.

How to write pages that earn precise citations

You can't write the text fragments yourself, but you can write content that makes good ones easy to generate:

The overlap with AEO is deliberate. The same answer-first, self-contained writing that helps you appear in Google AI Overviews is exactly what makes your sentences cleanly quotable by a text fragment.

Fragments, anchors, and what not to break

Text fragments coexist with ordinary #anchor links — the :~: delimiter keeps them from colliding. Because fragments are matched against rendered text, anything that hides your real content from crawlers also hides it from fragment matching. If a bot can't see the sentence, no assistant can build a fragment to it, which is another reason JavaScript-rendered or cloaked content underperforms. Serving the same visible text to every visitor keeps your quotable passages intact.

One caution: because highlighted passages are chosen by the linking system, you can't control exactly which sentence gets featured. What you control is the quality and clarity of your candidates. Write more clean, standalone, factual statements and you give assistants more good options to point at.

Curious whether AI crawlers can read the sentences you'd want them to quote? Run the CheckMy.site scanner to see how your pages render to the assistants deciding which passages to cite — and whether your best answers are actually visible to them.