Short answer: A table of contents with jump links lets readers of a long page see its structure at a glance and go straight to the section they need. It improves usability on long guides and can lead search engines to show section links in results, though that is never guaranteed. Build it from your H2 headings, use descriptive anchor IDs, keep it short, and add one only to pages long enough to need it.
What a table of contents and jump links are
A table of contents on a web page is a short list of links near the top, each pointing to a section further down. The links are called jump links or anchor links. Technically, each section heading gets an id attribute, such as id="title-length", and the link points to it with a fragment: href="#title-length". Clicking the link scrolls the page to that heading, and the URL changes to include the fragment, so the exact section can be shared.
Many content management systems and plugins generate tables of contents automatically from headings. They can also be written by hand for full control.
Why a table of contents helps readers
Most visitors scan long pages rather than reading from top to bottom. A table of contents supports that behaviour directly:
- It shows the scope of the page immediately, so readers know whether the answer they need is there.
- It saves scrolling, especially on phones, where a long guide can be dozens of screens.
- It lets people return to a section later, or share a link to one section with a colleague.
- It signals organization. A clear list of sections makes a long page feel manageable rather than overwhelming.
It also helps readers who arrive with a very specific question. Instead of scrolling and guessing, they read the list, recognize the section that matches, and jump. That is often the difference between staying on the page and going back to the results.
For reference-style content, such as documentation, long guides, policies and FAQs, a table of contents is often the most used navigation on the page.
What it can do for search
A table of contents is not a ranking factor, and adding one will not move a page up by itself. But it can help in a few indirect ways:
- Section links in results. Search engines sometimes show links to specific sections of a page below the main result, or send searchers directly to the relevant part of a long page. Clear headings with jump links make the structure easy to read, though whether such links appear is entirely up to the search engine.
- Clear structure. A table of contents built from descriptive headings reinforces what each section covers.
- Better experience. Readers who find their answer quickly are less likely to return to the results and choose another page.
Treat these as side benefits. The main reason to add a table of contents is that it makes long pages easier to use.
When to add one, and when not to
| Page | Table of contents? | Why |
|---|---|---|
| Long guide with many sections | Yes | Readers need to jump to the part they want |
| Documentation or help article with several steps | Usually | People return to specific steps |
| Policy, terms or long FAQ | Yes | Readers look for one specific clause or question |
| Short blog post with three sections | No | The whole page fits in a few screens |
| Product or service page | Rarely | Tabs or clear sections usually work better |
| Landing page focused on one action | No | It distracts from the call to action |
A reasonable threshold is a page with at least five or six substantial sections, or one long enough that a reader on a phone would scroll for a long time to reach the end.
How to build a good table of contents
Use your H2 headings
The table of contents should mirror the page’s main sections. For most pages, H2 headings are enough. Including every H3 turns the list into a second page of links; include them only for long reference pages where subsections are genuinely separate topics.
Write descriptive headings first
A table of contents is only as good as the headings it lists. “Introduction”, “Details” and “More” make a useless list. “How long a title should be”, “Why titles get rewritten” and “Examples by page type” make a useful one. If your table of contents reads badly, fix the headings.
Use readable, stable anchor IDs
Choose IDs that describe the section, such as #title-length, rather than automatic ones like #section-3 or #h-a8f2. Descriptive IDs make shared links understandable, and they do not break when you add a section above. Avoid changing IDs after publishing, since others may have linked to them.
Place it near the top, after the answer
Put the table of contents after the opening answer, not before it. Readers who only need the short answer get it immediately; those who want more see the map of the page next.
Keep it light
A table of contents should not push the content far down the page on mobile. Keep entries short, consider a collapsible version on small screens, and avoid heavy scripts to build it.
Make it accessible
Use a real list of real links inside a nav element with a label such as “On this page”. Make sure the jump moves keyboard focus to the section, and that a sticky header does not hide the heading after the jump.
An example in HTML
A simple, accessible table of contents for a guide about title tags might look like this in the page source:
- A
navelement labelled “On this page”, placed after the opening paragraph. - Inside it, an ordered list of five links: “What a title tag is” pointing to
#what-is-a-title-tag, “How long it should be” pointing to#title-length, “How to write one” pointing to#writing-titles, “Why titles get rewritten” pointing to#title-rewritesand “FAQ” pointing to#faq. - Each matching H2 in the article carries the same
id, for example<h2 id="title-length">How long should a title tag be?</h2>.
Notice that the link text in the table of contents can be shorter than the heading itself, as long as it clearly refers to the same section. The IDs are short, lowercase and hyphenated, the same conventions as good URL slugs, which keeps shared links such as /title-tag-guide/#title-length readable in chats and emails.
If your theme has a sticky header, add a small CSS rule such as scroll-margin-top on headings so the jump stops just below the header rather than hiding the heading behind it.
Common mistakes
- Tables of contents on short pages, adding clutter without saving any scrolling.
- Listing every heading level, producing a list longer than some sections.
- Vague headings that make the list meaningless.
- Automatic IDs that change when headings are edited, breaking shared links.
- Sticky headers covering the target heading after the jump.
- Plugins that load large scripts or insert the table of contents inside the first paragraph.
- Tables of contents built with JavaScript only, producing links that do not exist in the page’s HTML.
Adding tables of contents in WordPress
In WordPress, you have three options. Some themes and SEO plugins include a table of contents block that builds itself from the headings on the page. Dedicated table of contents plugins offer more control over which heading levels appear and where the list is inserted. Or you can add an HTML anchor to each heading block (under Advanced in the block settings) and write the list of links by hand, which gives you readable IDs and no extra scripts. Whatever you choose, check the result on a phone and confirm the IDs make sense.
Checking structure across your site
A table of contents depends on a clean heading structure, and heading problems are usually site-wide: missing H1s, headings used for styling, widget headings in the outline. Site SEO AI Audit checks H1s and other on-page elements on every page it crawls and ranks fixes by impact, and its AI visibility checks look at whether content is structured in a way AI answers can quote. You can run a free first audit.
Related reading
- Heading Structure for SEO: How to Use H2 to H6 Properly
- Readability and SEO: How to Write Pages People Finish
- Featured Snippets: How to Structure Content to Win Them
The bottom line
A table of contents turns a long page into something readers can navigate. Add one to pages long enough to need it, build it from descriptive H2 headings, use readable and stable anchor IDs, place it after the opening answer, and keep it light and accessible. Any benefit in search results is a bonus; the real value is a page people can use.
SSS
Does a table of contents help SEO?
Not as a ranking factor. It improves usability on long pages, reinforces a clear structure and can help search engines understand and link to specific sections, but none of that is guaranteed.
Should the table of contents include H3 headings?
Usually not. H2 headings are enough for most pages. Include H3s only on long reference pages where subsections are distinct topics readers look for directly.
Where should I put the table of contents?
After the opening answer or introduction, near the top of the page. Readers get the short answer first, then see the map of the rest.
Do jump links create separate pages in search?
No. A URL with a fragment such as #title-length points to a part of the same page. Search engines treat it as one page, though they may link to a specific section in results.
Are table of contents plugins safe to use?
Many are fine, but check that they output real HTML links, do not load heavy scripts, let you choose heading levels and create readable IDs.


