Link to Text Fragments

Syntax

In a similar manner to document fragments, text fragments are appended onto a URL after a hash symbol (#). The syntax however is a bit different:

https://example.com#:~:text=[prefix-,]textStart[,textEnd][,-suffix]

=> https://example.com#:~:text=domain
=> https://example.com#:~:text=domain,domain
=> https://example.com#:~:text=this-,domain,domain
=> https://example.com#:~:text=domain,domain,-in
=> https://example.com#:~:text=this-,domain
=> https://example.com#:~:text=this-,domain,-in
=> https://example.com#:~:text=domain&text=this-,domain&text=domain,-in
=> https://example.com#:~:text=domain%20is%20for,illustrative%20examples
=> https://example.com#:~:text=domain%20is%20for&text=illustrative%20examples
=> https://example.com#:~:text=illustrative,coordination

The key parts to understand are as follows:

:~:

text=

textStart

textEnd Optional

prefix- Optional

-suffix Optional

Supporting browsers will scroll to and highlight the first text fragment in the linked document that matches the specified directive. Note that it is possible to specify multiple text fragments to highlight in the same URL by separating them with ampersand (&) characters.

Usage notes

Document-Policy: force-load-at-top
Note: If the provided text fragment does not match any text in the linked document, or if the browser does not support text fragments, the whole text fragment is ignored and the top of the document is linked.

URLs with multiple text fragments

You can specify multiple text fragments to highlight in the same URL by separating them with ampersand (&) characters.

Full details are at

=> https://developer.mozilla.org/en-US/docs/Web/Text_fragments

Proxy Information
Original URL
gemini://jdcard.com/link-to-text-fragments.gmi
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
628.440821 milliseconds
Gemini-to-HTML Time
1.680296 milliseconds

This content has been proxied by September (3851b).