Website Pricing Guide

Enter your email to get instant access to our website pricing guide.

How To Create Anchor Links In WordPress (3 Methods)

June 19, 2024 by
With every Google update and release seemingly setting the world on fire for a few weeks (“The Internet will never be the same” one proclaims) afterward — we certainly can’t pretend to know what the leading search engine is thinking or planning. One thing we can say with certainty is that, for a long time […]


With every Google update and release seemingly setting the world on fire for a few weeks (“The Internet will never be the same” one proclaims) afterward — we certainly can’t pretend to know what the leading search engine is thinking or planning.

One thing we can say with certainty is that, for a long time now and probably for a while into the future, Google loves SEO-enhanced content.

DreamHost Glossary

SEO

Search Engine Optimization (SEO) is the practice of improving a site’s ranking in search results. Search results are aggregated based on a number of factors, including a site’s relevance and quality.

Read More

As a result, it’s thorough and generally lengthy articles (or Reddit posts) that often rank the best on Google’s search engine results pages (SERPs).

That’s all fine, right?

Well, there’s one problem with that — the rise of short-form content, especially video (thanks, TikTok!), is changing consumer preferences.

How do you strike the perfect balance?

You have to make content that’s robust enough for Google (and all search engines) that’s also easy for readers to navigate so they can engage with your website to find the value they’re seeking.

This is where anchor links come in.

With anchor links, you can very quickly send readers straight to a specific part of a page. That way, visitors can find the exact information they’re looking for instead of skimming through hundreds, or more often thousands, of words.

In this article, we’ll cover:

  • Exactly what anchor links look like and how they work.
  • The pros and cons of using anchor text on your pages or blogs.
  • Three ways to create anchor links on your WordPress website.

Let’s get to work!

Technically, an anchor link (aka anchor text or jump link) is any hyperlink within a page that usually points to another section on that same page.

To create one, you basically build a piece of code — don’t worry, we’ll show you how — around a URL to make it a “bookmark” of sorts. You can then attach that bookmark to any text or image on the same page. When someone clicks the bookmark, they’ll be quickly scrolled to the area of the page you’ve indicated with your code. If that didn’t make a lot of sense, hang tight; it will become clearer the more we talk about it!

In many cases, you’ll encounter anchor links within a table of contents (TOC) at the start of a page or post.

Screenshot Showing Toc Of A Dreamhost Post And How Some Anchor Links To Section Of Text While An Icon Anchor Links To Nav To The Top Of The Page
How To Create Anchor Links In Wordpress (3 Methods) 66

Other common examples of anchor links include buttons that return you to the top of the page when you reach the bottom. You can also use anchor links to help users navigate long landing pages.

Whether there’s a page or post on your website that’s a bit too long for manual scrolling, anchor links can help ensure you’ll capture visitor attention before you get a chance to deliver all the good stuff.

It’s important to note that search engines don’t claim that anchor links improve your search engine rankings directly. However, they do improve the experience for both users and the search engines that rank content.

Get Content Delivered Straight to Your Inbox

Subscribe now to receive all the latest updates, delivered directly to your inbox.

Overall, setting up anchor links can help improve content navigation. However, it’s not all sunshine and rainbows — there are a few downsides you may want to consider.

Here, we’ll explore both sides of the story.

Pro: Better Experiences All Around

With anchor text, readers can get a quick overview of your content, making them less likely to bounce and more likely to engage with it. In addition, web crawlers — bots that help search engines understand the content on the internet — can more quickly and clearly process lists.

Let’s dig a bit deeper into this advantage.

When rich snippets appear alongside top-ranking Google search results, they often include part of a page’s table of contents, which is usually created using anchor links. Google may also pull from a table of contents to populate the “People also ask” section at the top of the results page. In some cases, Google may even feature an article’s anchor text below the meta description using clickable links.

Screenshot Of A Google Search Result Showing Anchor Links Listed Right Below The Meta Description
How To Create Anchor Links In Wordpress (3 Methods) 67

All of these ways that Google uses anchor text and tables of contents help visitors understand what they’re going to find before they even click, which can help reduce your website’s bounce rate. That’s because you’re making life easier for users who might access the page, assume it’s not what they’re looking for because they don’t see what they want right away, and leave. Instead, you can keep them around much longer — more time for conversions! — by telling them exactly what they can find within a post or page and even linking them to it.

Pro: Easier Content Sharing

Anchor text makes it easy to share links that navigate to a specific section within an article. This is particularly useful when it comes to social media managers making posts, and support teams who need to share key parts of help articles with customers.

Con: Reducing Time On Site

If you’re measuring a metric like time on site to measure content and website performance, anchor links might actually reduce the average time visitors spend on your site because they can skip directly to the content they want instead of reading the entire article.

It’s up to you to balance making your visitors happy and your need to hit certain key performance indicators (KPIs).

Con: May Be More Difficult To Update Content Later

Over time, you may need to update your website domain or create 301 redirects, which will likely change links across your site. When changing links around, it can be hard to track down and update all the anchor text you’ve created to ensure every link is still fresh and accurate.

Notice the focus on the table of contents here? That’s because a TOC is probably the most impactful way to leverage anchor links on your website. However, it only makes sense to use anchor elements for long pages or blog posts. There’s no hard-and-fast rule, but anything above 1,500 words or so can likely benefit from a table of contents and its corresponding anchor links.

To add an anchor link to a shorter piece of content isn’t necessarily bad, but it can be less useful — making it a poor use of your time and possibly adding visual clutter for readers.

Staring down a long page or post you want to make more valuable for website visitors?

Luckily, creating anchor links is remarkably simple in WordPress!

You can do it either manually or with the help of plugins — both of which we’re going to dive into right now.

1. Add an Anchor Link Using HTML

All of the text you see on WordPress pages and posts is powered by HTML code. HTML, along with CSS and JavaScript, are some of the most-used programming and markup languages. If you can get even a little bit familiar with any of them, you’ll likely be able to do a lot more — with a lot less frustration! — on your WordPress site.

DreamHost Glossary

HTML

HTML stands for HyperText Markup Language. It is the most fundamental building block of the web and the standard markup language for creating web pages and applications.

Read More

So, we’ll start with showing you how easy it is to decipher and edit HTML!

First, choose the page or post where you want to add anchor links. We’re going to work with a blog post.

To create an anchor link, you first need to set an anchor. To do that, select a subheading that you want to link to, and click the three dots that show up on the right in the floating menu.

Screenshot Marking The Location Of The Three Dots, Far Right Hand Side Righta Fter The Hyperlink Icon
How To Create Anchor Links In Wordpress (3 Methods) 68

Select Edit as HTML near the bottom.

Screenshot Showing &Quot;Edit As Html&Quot; As The Lowest Choice From The Drop Down
How To Create Anchor Links In Wordpress (3 Methods) 69

What we need to do is add an HTML ID. That ID will be the anchor we’re going to link to later on. It will come before the name of the subheader you clicked on, in our case >Headline 3.

The format is: id=“anchor-name”. Our anchor name will be “headline-3.” Here’s what that code should look like when we’re done:

Headline 3

.

Screenshot Showing Html Id Tag As H2 Class=&Quot;Wp-Block-Heading&Quot; Id=&Quot;Headline-3&Quot; Headline 3
How To Create Anchor Links In Wordpress (3 Methods) 70

Once the ID is in place, you can attach it to text in your table of contents (or wherever else you want to place it) to create an anchor link!

In our example, we’ll scroll up to Headline 3 in the TOC, select it, and click the link icon that shows up in the hovering editing panel.

Screenshot Showing The Location Of The Link Icon, To The Right Of The Italics Icon
How To Create Anchor Links In Wordpress (3 Methods) 71

Into the link URL box, we’ll type in the ID we created, preceded by a #.

Screenshot Showing The Location Of The Link Icon, To The Right Of The Italics Icon
How To Create Anchor Links In Wordpress (3 Methods) 72

Hit Enter to make it official, save your work, then publish your changes. You won’t be able to see it in action inside the WordPress editor, so go take a peek at the finished page on your website to make sure it all works.

Manually creating HTML anchor links may seem intimidating if you’re not used to working with code. However, as you can see, adding anchor tags is remarkably simple. Once you know how the process works, adding these links manually should only take seconds.

If you want to create a link toward an anchor ID located on a different page or new tab, make sure to include the absolute URL of it, beginning with https.

2. Create Anchor Tags Using The Block Editor

Now, we’re going to show you how easy modern block themes make it to add an anchor link — no code required.

That’s because the Block Editor enables you to add HTML anchors or IDs without the need to switch over to the code view.

As with the previous method, the first thing you need to do is add an HTML ID or anchor to the text you want to link to. Select the text and open the settings menu from the square icon in the upper right corner.

Navigate to Block and open Advanced at the bottom. You’ll see a field called HTML anchor. All you need to do is add your unique anchor text within that field. We’ll go with “headline-3” again.

Screenshot Showing The Location Of The Block Editor Icon Which Looks Like A Box With A Rectangular On The Right Side
How To Create Anchor Links In Wordpress (3 Methods) 73

Now, we’re going to repeat the same steps from above:

  • Select the text you want to link your anchor to.
  • Click the link icon that shows up in the editing panel.
  • Type in # then the ID you just created.
  • Enter, save, publish, and check your work!

All that’s left to do now is repeat the process as many times as you need, depending on how many sections you want to add anchor links to. We love how easy the block editor makes this, especially if you deal with long-form content regularly (that’s us!).

Note: Not seeing all the cool block editor features we just covered? You may not be using a block theme! While you can certainly get away with adding anchor text in HTML, we do recommend upgrading to a block theme to take advantage of all the cool new features the WordPress community is adding every day. It’ll make your life easier! Start here to learn how to make the upgrade.

3. Link To An Anchor Quickly Using WordPress Plugins

It shouldn’t come as a surprise that there’s more than one WordPress plugin in the plugin directory you can use to add anchor links in WordPress.

  • The All in One SEO (AIOSEO) plugin (paid) has lots of features, one being easy-to-create tables of contents.
  • Link Whisper (paid) is a link optimization-focused that enables users to insert anchor links quickly.
  • With LuckyWP Table of Contents it’s right in the name — it’s all about creating linked tables of contents with just a few clicks.

Creating a table of contents for each of your posts can be a lot of work. You have to add multiple anchor IDs manually and create links one by one. Let’s zoom in on a solution that makes this task a little more approachable by automatically generating tables of contents for posts and pages within your website.

While the process should look decently similar for any plugin you choose, we’re going to walk you through the specifics of setting up a free, lightweight option — Easy Table of Contents.

To use the plugin, you first must navigate to Plugins > Add New Plugin in your WordPress editor.

Plugin Nav Showing Add New Plugin Selected
How To Create Anchor Links In Wordpress (3 Methods) 74

Search for Easy Table of Contents, use the Install Now button, wait for that to complete then click Activate to get it up and running on your site.

After you activate the plugin, you’ll need to configure its settings. Go to Settings in your WordPress admin sidebar and find Table of Contents.

Screenshot Showing The Settings Button In The Wp Nav
How To Create Anchor Links In Wordpress (3 Methods) 75

In the Enable Support menu, make sure both pages and posts are checked if you want to be able to use TOCs on both.

Now scroll down to Position, a setting which will enable you to decide where to display your tables of contents. At the time of this writing, by default, they’ll show up on posts and pages right before the first heading.

Right under it, the Show when setting lets you decide how many headings a post or page needs for the plugin to display a TOC. By default, the plugin will have a set number. Right now, that’s two. You can update either of these settings if you like.

Options For Easy Table Of Contents Plugin Showing Options For Position And Show When
How To Create Anchor Links In Wordpress (3 Methods) 76

There are a lot more settings on this page. Once you’re happy with everything, save your changes at the bottom of the screen and go to the post or page where you want to add the table of contents. We’ll go back to the blog post we’ve been working in.

At the bottom of the page, you’ll see a new section called Table of Contents. That means the plugin is working and will automatically set anchor IDs and generate a full table of contents leading to them!

Option To Toggle Off Automatic Toc Showing A Check Box Option To Disable The Automatic Insertion Of The Toc
How To Create Anchor Links In Wordpress (3 Methods) 77

You should see text indicating that a table of contents will instantly be inserted, as long as you leave the box unchecked. We like this feature because it makes it easy to turn off the table of contents for pages where it makes sense. We recommend scrolling and playing around with the settings again here to see if there’s anything unique you want to do with this post. For example, you can create a title for your TOC, move it around, exclude any headings you don’t want to appear, and lots more.

Keep in mind, these changes will only apply to this post and will override any global settings you just made over in the Settings menu.

Save your post, publish it, and go check out the live page to see your quick, easy, and fresh-to-death new TOC in action!

Screenshot Showing The View Of Table Of Contents With 1. Headline 1, 2. Headline 2, 3. Headline 3 Formatted
How To Create Anchor Links In Wordpress (3 Methods) 78

How Else Can You Upgrade Your WordPress Site?

Anchor links are incredibly useful elements for boosting SEO, as well as helping users navigate complex pages and long-form content. You can use anchor links in tables of contents, navigation menus, footnotes, and more. Thankfully, as you’ve seen, WordPress makes it simple to add anchor links to your content!

But using anchor links is just one of the many tricks you can implement to improve your website’s search engine rankings and user experience.

If you want to learn more about improving the WordPress experience as well as your all-important SEO ranking, here are a few additional tutorials you may want to check out:

Are you looking for a WordPress host that can help you serve long-form content to thousands of visitors without slowing down your site? DreamHost’s WordPress hosting packages are designed to handle large amounts of traffic while keeping your website fast.

How about a little help pulling off all that design, marketing, and more that running a successful business takes in this day and age? We also have plans to support you there. Check out all the offerings our awesome pro services team can deliver and craft your perfect website maintenance strategy today.

website management by DreamHost

WordPress Hosting

Unbeatable WordPress Hosting

Reliable, lightning-fast hosting solutions specifically optimized for WordPress.

See More

Jos Velasco is a WordPress Professional Consultant at DreamHost. His responsibilities include helping with advanced WordPress cases, creating training material, and identifying trends impacting the WordPress community. In his free time, he enjoys climbing mountains, eating healthy, and watching drama movies. Follow Jos on LinkedIn: https://www.linkedin.com/in/josvelasco/

Your Dream Website Is Just One Click Away

At Ericks Webs Design, we believe every business deserves a stunning online presence — without the stress. We offer flexible payment options, a friendly team that truly cares, and expert support every step of the way.

Whether you’re a small business owner, a church, or a growing brand, we’re here to bring your vision to life.

✨ Let’s build something amazing together.

— no pressure, just possibilities.

Latest News & Website Design Tips

Stay up-to-date with the latest insights, trends, and tips in business website design. Explore our newest articles to discover strategies that can help you elevate your online presence and grow your business.

Why Your Word-of-Mouth Strategy Is Failing — And How a Website Fixes It

Why Your Word-of-Mouth Strategy Is Failing — And How a Website Fixes It

Many contractors in South Texas rely too heavily on word-of-mouth for business, which limits their reach and customer engagement. While personal referrals are valuable, the increasing competition and digital shift mean that a lack of online visibility can cost potential clients. A well-designed website serves as a crucial marketing tool, showcasing work, capturing leads, and optimizing search engine rankings. This digital presence not only enhances brand identity but also facilitates local discovery, ensuring contractors can connect with clients actively searching for services. Embracing a website can revolutionize client interactions and ultimately drive business growth.

Why Dental Clinics Need a Website That Smiles Back

Why Dental Clinics Need a Website That Smiles Back

The article “Why Dental Clinics Need a Website That Smiles Back” emphasizes the importance of having a strong online presence for dental practices. It highlights that 77% of patients conduct online research before booking appointments, making a user-friendly website essential. A well-designed site acts as a digital business card, showcasing the clinic’s personality and inviting atmosphere. Key features like easy contact forms and scheduling tools enhance user experience. While investing in a website may seem daunting, it ultimately saves time and attracts new patients. The article encourages dental clinics to create websites that reflect their warm, welcoming vibe and invite potential patients to engage.

No Trust: Why Homeowners Skip Over Construction Companies Without a Website

No Trust: Why Homeowners Skip Over Construction Companies Without a Website

The article “No Trust: Why Homeowners Skip Over Construction Companies Without a Website” emphasizes the critical need for construction companies, particularly in South Texas, to establish an online presence. Homeowners increasingly rely on Google for finding contractors, and without a website, businesses risk losing potential clients to competitors. Common challenges include disappearing leads, poor online visibility, and over-reliance on referrals. A custom website can address these issues by showcasing projects, building trust with professional designs, and streamlining contact processes. Ultimately, having a website is essential for attracting clients and enhancing a construction company’s credibility in today’s digital landscape.

How to Build Trust for Online Shoppers

How to Build Trust for Online Shoppers

The article “How to Build Trust for Online Shoppers” highlights essential strategies for small business owners in South Texas to foster trust among potential customers. Trust is critical in online shopping, as consumers often rely on online reviews, quality images, and secure payment options to make decisions. Key tips include showcasing authentic customer reviews, using high-quality product images and descriptions, ensuring secure payment methods, communicating transparent policies, and engaging with customers on social media. By implementing these tactics, businesses can enhance their credibility and build lasting customer relationships, ultimately driving sales and improving their online presence.

No Website

No Website

The article “No Website” emphasizes the crucial need for construction businesses in South Texas to establish an online presence. Without a website, potential clients may overlook opportunities to engage, causing frustration and lost leads. A well-designed website serves as a 24/7 storefront, showcases a portfolio, facilitates communication, and boosts visibility on Google. By establishing trust and enhancing credibility, having a website can significantly increase qualified leads. The piece encourages construction business owners to invest in digital presence, highlighting how local expertise can tailor solutions to meet specific needs. Ultimately, it stresses that a website is not a luxury but an essential tool in a competitive market.

The Ultimate Church Website Checklist for 2025

The Ultimate Church Website Checklist for 2025

The article “The Ultimate Church Website Checklist for 2025” emphasizes the importance of a well-designed church website as a vital first impression for potential visitors. It outlines essential elements to include, such as a clear “About Us” section, easy navigation, mobile optimization, engaging content, and an accessible events calendar. It also highlights the need for visible contact information, social media links, member testimonials, and basic SEO practices. Regular updates and maintenance are crucial for keeping the site relevant and engaging. Ultimately, a well-crafted church website can enhance community connection and attract new members.

What Makes an Ecommerce Website Successful?

What Makes an Ecommerce Website Successful?

A successful ecommerce website is essential for small businesses, particularly in today’s digital landscape. Key factors include user-friendly design, which prioritizes simplicity; mobile optimization to cater to smartphone users; high-quality product images and descriptions that inform and entice; secure payment options to build trust; and effective SEO strategies to enhance online visibility. Local examples, such as “Fashion Fiesta” and “Blossom Boutique,” illustrate how these elements can lead to increased sales and customer engagement. By focusing on these strategies, business owners can create an ecommerce website that drives sales and fosters loyalty, ensuring long-term success in the competitive online marketplace.

Losing Jobs to the Competition? Hereʼs How a Website Can Fix That

Losing Jobs to the Competition? Hereʼs How a Website Can Fix That

The article “Losing Jobs to the Competition? Here’s How a Website Can Fix That” highlights how construction businesses, particularly in South Texas, can lose potential clients due to poor online visibility. Many contractors face challenges, such as relying on referrals and struggling to close leads. A well-designed website can serve as a 24/7 marketing tool, showcasing completed projects, building trust through testimonials, simplifying quote requests, and enhancing Google presence with SEO. Ericks Webs Design aims to help construction companies create impactful websites that attract leads and convert inquiries into contracts, ultimately allowing them to stop losing jobs to the competition.

Struggling to Get Construction Leads in Edinburg? Your Website Might Be the Problem

Struggling to Get Construction Leads in Edinburg? Your Website Might Be the Problem

The article “Struggling to Get Construction Leads in Edinburg? Your Website Might Be the Problem” addresses the challenges construction contractors face in attracting clients due to poor online visibility. Many contractors in Edinburg struggle with no-shows, flaky leads, and relying too much on referrals. A professional website can serve as an effective marketing tool, showcasing work, improving Google rankings, and making it easy for clients to contact contractors. By investing in a custom website, businesses can boost their online presence and generate more leads, ensuring they remain competitive in the industry. Ericks Webs Design offers tailored solutions to help local construction companies thrive online.

Why McAllen Contractors Are Booking More Jobs Thanks to Their Website (And You Can Too)

Why McAllen Contractors Are Booking More Jobs Thanks to Their Website (And You Can Too)

McAllen contractors are winning more jobs with custom websites that showcase their work, simplify quote requests, and improve search visibility. With strong local SEO and an online presence tailored for South Texas, a well-designed site can attract leads and boost credibility. Partnering with Ericks Webs Design helps contractors grow their business online with ease.