In 2020, it’s more important than ever to have a good user experience on your site and its content.
A table of contents can help the UX (user experience) of your content pages resulting in better rankings and more search traffic.
Table of contents allows users to click to certain sections of long-form content to easily access the information they were searching for.
When you use a table of contents, you can also receive jump to links and sitelinks in Google which can strongly increase your search rankings and organic traffic.
Here is an example of what it looks like when you use a table of contents:
In this guide, we are going to show you how to add a table of contents to your website or content pages.
What are Table of Contents?
A table of contents is an HTML table that includes links that allow you to scroll to a certain section for quick access on a single page.
It’s kind of like a table of contents in a book if you could click each chapter and quickly go to it.
There are plenty of examples of table of contents like:
and even something simple like:
These may seem like a simple addition to your content, but they can greatly increase your search traffic and SEO. Heres why…
Why You Should Use Table of Contents
Using a table of contents helps you rank better for a few reasons.
One is that it will increase the user experience on your site. This is important because Google looks if searchers are finding the information they queried. When the searcher finds your content and answers their query, Google’s algorithm sees this and gives you better rankings because of it.
Another is that it can create ‘jump to’ links in Google, which make your listing stand out more as well as making it easy for a searcher to click right to the section of content that answers their query.
Lastly, you can get sitelinks or multiple jump links that can really make your SERP listing stand out and increase your CTR.
As you can see, it takes up much more space and increases the chances of getting click by a numerous amount.
So now that you are familiar with what a table of contents is and how it can help your SEO, here is how to set it up on your WordPress website.
Install Table of Contents Using a Plugin
The easiest way to set up a table of contents on your posts is to use a WordPress Plugin.
Here are some of the best table of contents plugins for WordPress:
We have found that the best and simplest plugin is the Easy Table of Contents plugin.
Simply install the free plugin in your WordPress website’s plugin manager. For help on how to install plugins, check out our guide on getting started with WordPress.
Once installed, you will see a new link in the settings tab for Table of Contents.
Here you can edit how your table of contents will appear, when it will appear and where it can appear.
You can even set custom colors for your table of contents so that it matches your website theme.
Once you have edited all the settings, click save and then you will need to add a small shortcode to the pages or posts that you want to show a table of contents on.
Simply add this shortcode to your post or pages:
Then it will show your table of contents with the settings that we set up before.
And that’s it! You can add the shortcode to each page and it will use your headings (h2, h3, h4, etc) to create jump-to links and a table of contents.
Install Table of Contents Manually with HTML
If you do not want to use a plugin and you just want to set up a table of contents manually using HTML, that is possible as well.
You will need to add the HTML to each of your posts that you want the table of contents to appear on. Then, you will need to add the jump to links for each section you want to link to.
So first, you will need to create a list or table that has all of your section titles. Here is a simple example you can use:
<label>Table of Contents</label> <ul> <li><a href="#whataretoc">What Are Table of Contents?</a></li> <li><a href="#whyusetoc">Why use Table of Contents?</a></li> <li><a href="#installlingtoc">Installing Table of Contents</a></li> <li><a href="#conclusion">Conclusion</a></li> </ul>
Once your list is built, you will need to add the <a> tag to each section you want to link to. Here is an example of the implementation for the first link above:
So when you place this a tag in the coorespoding section or part of the page, you can then click on the link in the table of contents and it will scroll the page to your a tag. Make sure you change the hash variables to match your content.
So now that you have added a table of contents to your longer content pages, you will notice an increase in time-on-page as well as CTR from Google.
As Google indexes your content and table of content links, it should add those jump to links to your listing. Don’t go overboard with the number of links you add or you may not get the feature added to your listing in the SERPs.