Long-form content is great for building authority and answering questions thoroughly. But when a reader is looking for one specific answer, making them scroll through thousands of words can be frustrating.
That’s where links to specific paragraphs or sentences can make a big difference. Instead of simply pointing readers to a page, you can guide them straight to the information you want them to see.
In this article, we’ll show you how to link directly to a specific paragraph or sentence in your WordPress posts using two simple methods.

Here’s what we’ll cover in this article:
The Quick Way: Copy a Highlight Link From Your Browser
The easiest way to create a link that points to a specific paragraph or sentence is to let your browser generate it for you with a click.
Simply open the page you want to link to and highlight the exact words you want to share. After that, right-click the selection and choose ‘Copy Link to highlight’.

If you’re using Safari, this option is listed as ‘Copy Link with Highlight’.
Your clipboard now holds the completed link. It contains the address of the page, the characters #:~:text=, and the words you selected in encoded form. This means spaces and punctuation are replaced by codes like %20 so they are safe to put in a URL.
https://example.com/wordpress-post/#:~:text=Start%20highlight%20here
When a reader clicks that link, their browser immediately scrolls to the designated passage and highlights the text.

Keep in mind that this only works on standard, selectable text. Highlight links will not work on text embedded inside images, PDF documents, or an embedded frame such as a YouTube video player.
The Manual Way: Write the Text Fragment URL Yourself
Sometimes, the automatically generated link is not quite what you need. For example, the exact phrase might appear multiple times on the page, or you may want to highlight an entire passage without using several paragraphs of text in your link.
For those cases, understanding how the URL is structured gives you complete control over what gets selected:
https://example.com/page/#:~:text=prefix-,textStart,textEnd,-suffix
textStartis the only required part. On its own, it tells the browser to highlight that exact phrase.textEndturns your selection into a range, highlighting everything from your start phrase all the way to your end phrase.prefix-and-suffixspecify the words immediately before and after your target text. They are useful when the same phrase appears multiple times on the page and you need to tell the browser which occurrence to use.
To highlight a long passage without typing every word, you only need to type the opening phrase and the closing phrase, separated by a comma. The browser will automatically highlight everything between them.
https://example.com/page/#:~:text=Start%20of%20the%20passage,end%20of%20the%20passage
Similarly, you can highlight two separate passages on the same page by joining them with &text=. This is useful when you want to direct readers to two related pieces of information, such as a claim and the caveat that follows it.
https://example.com/page/#:~:text=first%20passage&text=second%20passage
If you don’t want to write URLs manually, the free Text Fragment Link Generator can build the URL for you automatically.

In the tool, paste the target page address along with the exact text you want to highlight.
If the text appears multiple times on the page, you can fill in the optional prefix and suffix fields to pinpoint the exact location. The tool will automatically apply the correct encoding and output a finished link ready to copy and share.
Adding the Highlight Link to Your WordPress Post
Once you’ve copied the link to your clipboard, you can add it in the WordPress block editor exactly the way you add any other link. You do not need any additional plugins or custom blocks.
Simply open the post or page you want to edit and select your anchor text. This is the word or phrase you want the reader to click on.
Next, click the Link icon in the block toolbar, or use the keyboard shortcut Ctrl+K on Windows / Command+K on Mac.

After that, paste the highlight link into the field and press Enter. WordPress stores the whole URL, including the text fragment on the end of it.
Finally, publish or update the post and click the link on the live page. The browser should jump to the passage and highlight it, which confirms the reference is working.
Linking to a Specific Part of a Post Using Anchor Links
An anchor link takes the reader to a specific section on a page using an HTML id attribute added to a block in the editor. While it does not highlight text the way a text fragment does, it will never break if you update or edit the wording later.
To add an anchor link, select the block you want to link to, such as a heading, inside the WordPress content editor.
Then, open the Block tab in the right-hand Settings sidebar, expand the ‘Advanced’ panel, and type a short keyword into the ‘HTML anchor’ field.

You can use the HTML anchor to create an anchor link. Within the same page, the link looks like this:
<a href="#linkedsection">
If you’re pointing at an ID attribute on a different web page, the link looks like this:
<a href="https://example.com/#linkedsection">
To add an ID, you’ll need to edit the post so this method works best for your own content.
For the full walkthrough in both editors, see our step-by-step guide on how to easily add anchor links in WordPress.
Frequently Asked Questions About Referencing Text in WordPress
Below are answers to some of the most common questions we receive about creating links to specific paragraphs and sentences.
1. What is the difference between an anchor link and a highlight link?
The difference is what each link targets.
An anchor link points to a fixed HTML ID added to the page, keeping the link active no matter how the wording around it changes.
A highlight link points at the words themselves and highlights them when the page loads. You don’t need to edit the target page, so it’s ideal for citing other sites. However, it will stop working if that wording is ever edited.
2. Do anchor links work on all websites?
Yes, anchor links are a fundamental part of HTML and work on any website in every modern browser.
3. What happens if the text on the page changes?
The link may stop working as expected if the referenced text is removed or significantly changed. Since the browser needs to find the specified words on the page, the text must still match for the highlight to work.
We hope this tutorial helped you learn how to reference a specific paragraph or sentence in WordPress posts. You may also want to see our guide on WordPress SEO and our tips on internal linking for SEO.
If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.


Jiří Vaněk
I used to work with anchors, but linking to highlighted text was always a mystery to me. It’s actually quite simple. It’s very useful for me when writing articles, and I’m glad I learned it from this article. I really didn’t expect it to be that easy.
WPBeginner Support
Glad we could help clarify the process
Admin
Dennis Muthomi
found the tip about using Google Chrome’s “Copy Link to Highlight” feature particularly useful
It reminds me of how Google’s featured snippets work – when you click on a sitelink, it takes you directly to the relevant section and highlights the text. This is a handy way to reference specific parts of an article without having to manually add anchor links. Thanks for sharing these techniques, they’ll definitely come in handy for improving the user experience when linking to content
WPBeginner Support
You’re welcome!
Admin