Somebody searches a very specific question, clicks your 3,000-word guide, and lands at the top of a wall of text that buries the one paragraph they came for four screens down. Most of them scroll for a second or two, don’t see it, and hit the back button. You never ranked lower and you never lost the click — you just lost the reader after you’d already won them.
A table of contents fixes exactly that. It’s the short list of jump links near the top of a long post that lets someone go straight to the section they want, and it quietly reshapes how both people and search engines move through your page. The mechanism underneath it — HTML anchors — has been part of the web since almost the beginning, and WordPress supports it in core without a single plugin. Most site owners just never turn it on.
This guide covers what a table of contents really is under the hood, how WordPress handles the anchors that make it work, the SEO payoff and where that payoff is overstated, and the small technical details that silently break jump links if you’re not watching for them.
What a Table of Contents Actually Is
Strip away the styling and a table of contents is two plain things working together: a list of links, and a set of targets for those links to point at. The targets are HTML anchors — specific spots on the page, each marked with a unique id attribute. The links are ordinary anchor links whose destination is # followed by one of those ids. Click #pricing and the browser scrolls to whatever element carries id="pricing". That’s the whole trick.
This is why the address bar changes to something like yoursite.com/long-guide/#pricing when you click a jump link. The part after the # is called the fragment, and it’s handled entirely by the browser — no new page load, no round trip to the server. The browser finds the matching element and moves the viewport to it. Because the fragment lives in the URL, you can also copy that link and send it to someone, and they’ll land on the same section you did.
Older sites did this with named anchors — an empty <a name="pricing"></a> tag dropped in front of a section. That approach still works in most browsers for backward compatibility, but the name attribute on anchors was dropped in HTML5, and the modern, valid way is to put an id on the heading itself. WordPress does exactly that, which is what makes a proper table of contents almost free to build.
How WordPress Handles Anchors Out of the Box
Here’s the part that surprises people: you don’t need a plugin to create the anchors. The core block editor has supported them for years.
The HTML anchor field on every heading
Select any Heading block, open the block settings sidebar, and under Advanced you’ll find a field labeled HTML anchor. Type a word or two there — say pricing — and WordPress renders that heading as <h2 id="pricing">. That’s a live jump target. Anywhere on the page, a link pointing to #pricing will now scroll straight to it. The Heading block declares anchor support in its own block definition, so this isn’t a hidden trick or a theme feature — it’s baked into WordPress core, and it’s true on any current install.
If you leave the field blank, many themes and the editor will still generate a slug-style id from the heading text, but that auto-generated value can change if you edit the wording later. Setting the anchor by hand gives you a stable, predictable target you control — which matters the moment anyone bookmarks or links to that section.
What core does not give you
The anchors are built in. A finished, auto-updating table of contents block is not — at least not one that’s turned on by default. There is a core/table-of-contents block in the works, but it’s flagged experimental and ships through the Gutenberg feature plugin rather than in stable core, which is why a default WordPress install has no such block available in the inserter. So out of the box you have two honest options: build the list by hand with a normal list of links pointing at your anchors, or reach for a block or plugin that assembles it automatically. Both are covered below, and neither is complicated.
A table of contents is one of the rare on-page changes that helps readers and search engines at the same time. Readers get to the answer faster, which keeps them on the page instead of bouncing. Search engines get a clean map of your headings and a set of named sections they can point directly to — occasionally as a “jump to” link right in the search result. You’re not gaming anything; you’re just making a long page navigable.
The SEO Payoff, and Where It’s Overstated
The honest version of the SEO story has two halves, and a lot of advice online only tells you the flattering one.
The real benefit is mostly about behavior. When someone can jump straight to the section that answers their question, they’re far more likely to stay, read, and trust the page than if they’d landed in a wall of text and given up. That improved experience on long-form content is the durable win, and it doesn’t depend on any single ranking factor.
The “jump to” links you sometimes see
Google can, in some cases, generate links that go directly to a relevant section of a page — the “jump to” links that occasionally appear under a search result, and the highlighted passages you land on when Google scrolls you straight to the matching text. Well-structured headings with clear anchors make a page easier for Google to understand and segment, which is a reasonable thing to want. What it isn’t is a guarantee. Google decides when and whether to show those section links algorithmically; adding a table of contents makes your page a better candidate, not a certainty. Treat the section links as an occasional bonus, not the reason you’re doing this.
Where the hype gets it wrong
You’ll read claims that a table of contents “boosts your rankings” as if the block itself were a ranking signal. It isn’t one. There’s no documented ranking bonus for having a table of contents on the page. What you actually get is better structure, clearer headings, stronger internal navigation, and a page people are willing to read to the end — all things that support ranking indirectly without being a magic switch. If you add one expecting an overnight jump in position, you’ll be disappointed. Add it because it makes a genuinely long page usable, and the rest tends to follow.
Three Ways to Build One
There’s no single right method — the best choice depends on how many long posts you have and how much you want to think about it. Here are the three that actually hold up.
By hand, with core anchors and a list
For a one-off pillar page, the manual route is genuinely fine and costs nothing. Give each major heading an HTML anchor in the block settings, then add a List block near the top where each item is a link pointing at the matching #anchor. It takes a few minutes, it adds zero plugin weight, and it gives you total control over which sections appear and how they’re worded. The one catch is maintenance: if you restructure the post later, you have to update the list yourself, because nothing is watching the headings for you.
An automatic block or the Gutenberg plugin
If you’d rather the list build itself, a dedicated table-of-contents block reads your headings and generates the jump links automatically, keeping them in sync as you edit. This is the sweet spot for a blog that publishes long guides regularly. Just confirm the block outputs real anchor links to heading ids — a good one relies on the same HTML-anchor mechanism core already provides, rather than inventing its own scheme that a theme change could break.
Your SEO plugin probably already has one
If you run a major SEO plugin, check its block library before installing anything new — several include a table-of-contents block of their own, and using the one from a plugin you already run means one less moving part to maintain. The output is the same idea underneath: anchors on your headings, a list of links to them. The value of using your existing plugin’s version is simply fewer plugins overall, which is its own kind of site hygiene.
The target — a heading with an id: <h2 id="pricing">Pricing</h2>
The link — points at the fragment: <a href="#pricing">Pricing</a>
The URL — reflects it: yoursite.com/guide/#pricing
The rule of thumb — one id per page, lowercase, no spaces, and don’t change it once people link to it.
The Small Details That Break Jump Links
Anchor links look trivial until they quietly stop landing where they should. A handful of predictable issues cause almost all the trouble, and every one of them is avoidable if you know it exists.
The sticky header that eats your heading
This is the most common complaint by far. If your theme has a fixed header that stays pinned to the top as you scroll, clicking a jump link scrolls the target heading to the very top of the viewport — directly underneath that header, where you can’t see it. The fix is a single CSS property: scroll-margin-top on your headings, set to roughly the height of the fixed header. It tells the browser to stop scrolling a little short so the heading clears the bar. We added exactly this line to a client’s long-form template after readers kept reporting that the table of contents “jumped to the wrong place” — the links were fine; the sticky nav was covering the destination every time.
Duplicate and shifting ids
An id is supposed to be unique on the page. Give two headings the same anchor and the browser will only ever scroll to the first one, so the second jump link silently misfires. Auto-generated anchors can also change when you reword a heading, which quietly breaks any bookmark or inbound link that pointed at the old value. Both problems disappear if you set anchors deliberately, keep them unique, and leave them alone once a section has an audience.
Smooth scrolling, if you want it
By default the jump is instant — the page just snaps to the target. If you’d prefer the gentle glide, the CSS property scroll-behavior: smooth handles it natively now, with no JavaScript required. It’s purely cosmetic and entirely optional, and it’s worth remembering that some visitors set a system preference to reduce motion, which you can respect with a media query. Nice to have, not load-bearing.
Click every link in your table of contents once. Confirm each one lands on the right heading and that a sticky header isn’t covering it. Then reload the page with a #anchor already in the URL to make sure a shared or bookmarked link works cold. If those three pass, your jump links are solid.
When You Actually Need One
A table of contents earns its place on long, multi-section content — the pillar pages, thorough how-to guides, and reference posts where a reader might reasonably want one specific part. On a 500-word blog post it’s clutter that solves a problem you don’t have. The rough line is scannability: if someone would have to scroll several screens to find a particular answer, give them a way to skip ahead. If the whole thing fits on a screen or two, don’t bother.
The deeper point is that a table of contents is really a symptom of good structure, not a substitute for it. It only works because your headings are clear, descriptive, and logically ordered — the same headings that help search engines and screen-reader users understand the page in the first place. Get the heading structure right and the table of contents almost writes itself. Bolt one onto a poorly organized post and it just exposes the mess. So if you’re adding jump links, take the extra ten minutes to make sure the sections they point at are genuinely worth jumping to.
Frequently Asked Questions
A long guide nobody can navigate is a long guide nobody finishes. Give your best sections a name and a link, and let readers go straight to what they came for.
Built by amplifi.studio — see also our WordPress internal linking guide.