When I refer to one sentence in a long article, a plain link drops the reader at the top. A text fragment adds the words to look for, and the browser scrolls to them and highlights them.
https://example.com/docs/setup#:~:text=back%20up%20the%20database
https://example.com/docs/setup#:~:text=Before%20you%20start,restart%20the%20service
https://example.com/docs/setup#:~:text=step-,3,-:%20open
Everything after #:~:text= is the text to find, URL encoded. A single string matches that exact text. Two strings separated by a comma match a range from the first words to the last. The optional prefix- and -suffix parts (note where the hyphen goes) say what must come right before or after, which helps when the same words appear more than once, like the “3” in the last example.
Chrome and Edge have a “Copy link to highlight” item in the context menu that builds the link for you. As the page owner you can style the highlight with the ::target-text pseudo-element.
Support: Chrome 80, Safari 16.1 and Firefox 131. A browser without support just opens the page at the top, so the link still works. It breaks quietly when the page text changes, so for links that should last years a real id anchor is more reliable. MDN also notes it only works on user initiated navigations and never inside an iframe.
Further reading: MDN: Text fragments, MDN: ::target-text