Long articles have a navigation problem. A 4,000-word buying guide may answer exactly the question a reader has, but if the answer is in the eleventh section, most readers will never scroll that far. A linked table of contents fixes this. It shows the whole structure at a glance and lets readers jump straight to the section they need. It also gives search engines named sections they can link to directly from results. A table of contents generator builds that list, and the anchors it needs, from your existing headings in seconds.
This guide explains why tables of contents help readers and SEO, how to use the free Table of Contents Generator on SEO Tools, and how to get the most out of one.
What Is a Linked Table of Contents?
A linked table of contents is a list of a page's sections, usually near the top, where each item links to the matching heading further down. It works with two pieces:
- Anchors (ids) on headings, such as
<h2 id="mattress-firmness">Mattress Firmness</h2> - Links to those anchors, such as
<a href="#mattress-firmness">Mattress Firmness</a>
When a reader clicks an item, the browser jumps to the heading with that id. The URL also changes to include the fragment, such as example.com/mattress-guide/#mattress-firmness, which means people can share a link to a specific section.
Why a Table of Contents Helps
Readers find what they need
Most visitors arrive with one question. A table of contents shows them immediately whether the page answers it, and where.
Long content becomes usable
A clear structure at the top makes a long page feel organised rather than overwhelming, which encourages people to stay.
Search engines can link to sections
Google sometimes shows "Jump to" links beneath a result, or sends searchers directly to a specific section of a page. Named, linked sections make this easier.
Sections can be shared and linked
Anchors give every section its own URL. Support teams, writers and other sites can link precisely to the part that matters.
It exposes weak structure
If your table of contents reads badly, your headings need work. Building one is a quick test of whether the page is well organised.
Tip: Keep headings short and specific. Every heading becomes a contents entry, so "Delivery Costs" works far better than "Some Information About How Much It Costs to Deliver".
How to Use the Table of Contents Generator
You need the article as HTML or Markdown.
- Paste the article. HTML from your CMS's code view, or Markdown from your editor or help centre.
- Choose the levels. Include H2 only for a compact list, or H2 and H3 for a detailed two-level list.
- Generate. The tool adds a stable id to each heading and builds the linked contents list.
- Copy the result. Paste the updated article, with ids and the contents list, back into your CMS.
- Test the links. Click each item on the published page to confirm it jumps to the right section.
The Table of Contents Generator how-to page shows output for HTML and Markdown.
What the Generator Does
- Reads your headings, H2 to H6, in order
- Creates clean, stable ids from the heading text, such as
how-firm-should-a-mattress-be - Handles duplicates by numbering repeated headings so every id is unique
- Builds a nested list that mirrors your heading hierarchy
- Preserves existing ids where headings already have them
- Outputs HTML or Markdown, matching your input
Where to Place the Table of Contents
- After the introduction, so readers first see what the page is about, then how it is organised
- Before the first H2, so it is visible without much scrolling
- Optionally, as a sticky sidebar on wide screens for very long guides, so readers can navigate at any point
Avoid placing it above the introduction. Readers need a sentence or two of context before a list of sections makes sense.
How Many Levels to Include
- Short articles (under about 1,500 words): often no table of contents is needed
- Medium articles: H2s only
- Long guides with clear subsections: H2s and H3s
- Very long reference pages: H2s and H3s, possibly collapsible
Including every H4 and H5 usually makes the list too long to scan.
Worked Examples
A 4,000-word buying guide
Imagine a mattress buying guide with 14 H2s and 22 H3s. The generator produces a two-level contents list, placed after the introduction. After publishing, Google begins showing "Jump to" links beneath the result for "mattress firmness guide", and average time on page rises, because readers go straight to the section they wanted instead of giving up.
A help centre article in Markdown
Now picture a support team that writes help articles in Markdown. They paste an article into the generator and get back the Markdown with heading ids and a Markdown contents list. Their help centre renders it correctly without any HTML editing, and support agents can now link customers to the exact step they need.
Writing Headings That Make Good Contents Entries
Because the table of contents is built from your headings, the quality of one depends on the other.
- Make each heading specific. "How Firm Should a Mattress Be?" tells readers exactly what is there.
- Keep them short. Aim for under about eight words.
- Use parallel wording for related sections: "Choose Your Size", "Pick a Firmness", "Set a Budget".
- Front-load keywords. Readers scan the start of each entry.
- Avoid duplicates. Two sections called "Overview" are confusing in a contents list.
- Check the hierarchy. H3s should sit under the right H2s, with no skipped levels.
Stable Anchors Matter
Once a section has an id and people start linking to it, changing the id breaks those links. A few practices keep anchors stable:
- Generate ids once and keep them when you edit headings slightly
- Check CMS behaviour. Some editors regenerate ids every time a heading changes, which breaks existing links
- Avoid ids based on numbers like
section-3, which change when sections are reordered - Keep ids lower case with hyphens, matching the heading's meaning
Tables of Contents and SEO
A table of contents is not a ranking factor in itself, but it supports several things that matter:
- Engagement: readers find answers faster and stay longer
- Sitelinks and jump links: Google can link to named sections from results
- Featured snippets: clearly structured sections are easier to extract
- Internal linking: anchors let you link precisely to sections from other pages
Google's guidance on influencing your title links and snippets and on page structure generally favours clear, descriptive headings, which a table of contents both requires and rewards.
Adding a Table of Contents in Popular Platforms
WordPress
The block editor lets you set an HTML anchor on any heading under Advanced in the block settings. You can paste the generated contents list as a List block with links, or as a Custom HTML block. Several plugins build tables of contents automatically; if you use one, check that it produces stable ids and does not duplicate a list you have added by hand.
Shopify and other ecommerce platforms
Blog and page editors usually allow HTML. Paste the generated HTML into the code view, including the ids on headings. Keep product page contents short, if you use one at all.
Help centres and documentation tools
Many documentation tools, including those that use Markdown, generate heading ids automatically. Check their format before linking to sections from other pages, and use the generator's Markdown output where the tool does not create a contents list for you.
Static site generators
Tools such as Hugo, Jekyll, Eleventy and Next.js often have built-in or plugin-based table of contents features. The generator is useful for checking what ids your headings should have and for content written outside the build system.
Email and PDFs
Linked tables of contents also work in HTML emails and many PDF exports, as long as the ids survive the conversion. Test before sending.
Styling the Contents List
A table of contents should be easy to spot and easy to ignore:
- Give it a clear label, such as "In this guide" or "Contents"
- Keep it visually distinct with a light background or border
- Use indentation for H3 entries under their H2s
- Consider collapsing it on mobile for very long lists, with a clearly labelled toggle
- Do not use tiny text; entries should be as readable as body copy
Accessibility Considerations
- Use a real list (
<ul>or<ol>) inside a<nav>element, ideally with anaria-labelsuch as "Table of contents" - Make links descriptive, which they will be if headings are descriptive
- Ensure focus moves to the heading when a link is followed, so keyboard and screen reader users land in the right place
- Do not hide the contents behind interactions that are hard to operate with a keyboard
A Table of Contents Checklist
- Include only H2s, or H2s and H3s for long guides
- Use short, descriptive headings that make sense out of context
- Give each heading a stable, readable id, such as
#how-to-choose - Place the list after the introduction, before the first main section
- Test every link after publishing and after any heading change
- Keep it collapsible on mobile if it is long
Common Mistakes
- Adding a table of contents to short pages, where it adds clutter
- Vague headings that make a meaningless list
- Ids that change whenever headings are edited
- Too many levels, creating an unscannable list
- Placing it above the introduction
- Broken links from ids that do not match the headings
- JavaScript-only contents lists that do not work without scripts
Frequently Asked Questions
Does a table of contents help SEO?
It is not a direct ranking factor, but it improves usability and can help Google show jump links to sections of your page.
Should every blog post have a table of contents?
No. It is most useful on long articles with several clear sections.
Can I use the generator for Markdown?
Yes. Paste Markdown and you get Markdown back, with ids and a contents list.
Will the ids break if I edit a heading?
Only if your CMS regenerates them. If you keep the generated ids, links to sections keep working.
What if my headings already have ids?
The generator keeps existing ids and builds the contents list around them.
Long content deserves a map. Paste your article into the Table of Contents Generator, check that the list reads well as a summary of the page, and give every reader a shortcut to the section they came for.
Printed from seo-serps.com — https://seo-serps.com/seo-search-marketing/table-of-contents-generator-add-a-linked-contents-list-to-any-article/ — updated November 23, 2026.