Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPB Cup
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

How to Reference a Specific Paragraph or Sentence in WordPress Posts

Editorial Note: We earn a commission from partner links on WPBeginner. Commissions do not affect our editors' opinions or evaluations. Learn more about Editorial Process.

Do you want to reference a specific paragraph or sentence in a WordPress post?

When linking to information online, sometimes linking to a web page is not enough. It’s often better to take your readers to the exact paragraph or sentence.

In this article, we will show you how to reference a specific paragraph or sentence in your WordPress posts.

How to Reference a Specific Paragraph or Sentence in WordPress Posts

Why Reference Specific Parts of a Post?

When you create a new post on your WordPress blog, you may wish to link to a specific paragraph or sentence.

For example, a journalist may need to reference the exact source of a quote. Or a blogger can make it easy for their readers to jump to a specific section of the blog post.

If you simply link to a long web page, then your readers may find it difficult to find the information. Taking them to the right paragraph or sentence and highlighting the relevant text offers a better user experience.

Let’s look at how to link to a specific paragraph or sentence in your WordPress posts. We will cover two methods. The first will often work better for posts on your own blog, while the second method is better for external links:

Method 1: Linking to a Specific Part of a Post Using Anchor Links

The best way to link to a specific section of the posts on your own WordPress website is to use anchor links. This method won’t highlight the sentence or paragraph, but unlike Method 2, it will work with all web browsers.

Anchor links will immediately jump your readers to a specific place on the same page that is marked with an ID attribute. They are often used when building a table of contents. However, anchor links can also link to specific sections of other posts.

You will need to be able to edit the post to add an ID attribute to the sections you wish to link to. However, if you notice that an external website has used ID attributes, such as in a table of contents, then you can use them in links as well.

Anchor Links Rely on HTML Anchor ID Attributes

Once you know the ID of a specific section of the post, then you can use it to build a link. It will look something like this:

<a href="#linkedsection">

Or, if you wish to link to an ID attribute on a different web page, then the link will look like:

<a href="https://urltowebpage/#linkedsection">

To learn the right way to create anchor links, see our step-by-step guide on how to easily add anchor links in WordPress.

Method 2: Linking to Highlighted Text Using Google Chrome

Google Chrome can create links to specific paragraphs and sentences found on web pages. Introduced to the browser in version 90, this feature was first available in a Chrome extension called Link to Text Fragment. However, that extension is no longer needed.

This method works for linking to other websites because it doesn’t rely on ID attributes or the page’s formatting. It also automatically highlights the text that you are linking to. However, the link it creates will not work with all web browsers.

You should start by highlighting the text you wish to reference. After that, you need to right-click the text and choose ‘Copy Link to Highlight’ from the menu.

Choose 'Copy Link to Highlight' From the Menu

Here is an example of a link to highlight.

As you can see, it includes a link to the URL of the web page followed by the characters #:~: and then the highlighted text:

https://www.wpbeginner.com/beginners-guide/how-to-easily-add-anchor-links-in-wordpress-step-by-step/#:~:text=Anchor%20links%20are%20commonly%20used%20in%20lengthier%20articles%20as%20the%20table%20of%20contents%20which%20allows%20users%20to%20quickly%20jump%20to%20the%20sections%20they%20want%20to%20read.

These links will work with any compatible browser, including Chrome and Edge, and version 80 and above of all Chromium-based browsers.

This is how it will look when your Chrome users click on a link to a highlight:

Link to a Text Fragment Preview in Chrome

However, links to highlights are not supported by all browsers.

For example, they are currently not supported by Firefox or Safari. The links will take you to the correct web page but not to the quoted section, and they won’t display a highlight.

Expert Guides on Adding Links in WordPress

Now that you know how to reference specific paragraphs and sentences in WordPress posts, you may like to see some other articles related to adding links in WordPress.

We hope this tutorial helped you learn how to reference specific paragraphs and sentences in WordPress posts. You may also want to see our guide on how to increase your blog traffic or our expert pick of tips to speed up WordPress performance.

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.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us. Here's our editorial process.

Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit - a collection of WordPress related products and resources that every professional should have!

Reader Interactions

3 CommentsLeave a Reply

  1. Syed Balkhi says

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. Dennis Muthomi says

    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

Leave A Reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.