Table of Contents
A table of contents is a list of links near the top of a page that lets readers jump straight to each section. On long guides it improves navigation and readability, and the anchor links it creates can help search engines understand page structure and sometimes link directly to a section from the results.
How a table of contents works
Each section heading is given an ID, and the contents list links to it using a fragment, the part of a URL after the # symbol. For example:
<h2 id="costs">How much does it cost?</h2>
A link to #costs then scrolls the reader straight to that heading. Many CMS platforms and plugins build the list automatically from your header tags, usually H2s and sometimes H3s.
Why it matters for SEO and users
- Faster answers: visitors can skip to the part they need, rather than scrolling through a long page.
- Clear structure: a visible outline shows readers, and search engines, how the page is organised.
- Jump links in results: Google sometimes shows links to specific sections beneath a result, a type of in-page sitelinks, and may send searchers directly to the relevant section. Clear headings and anchors make this easier, though it is never guaranteed.
- Better experience on mobile: long pages are harder to navigate on small screens.
- Accessibility: a proper list of links helps keyboard and screen reader users move around the page.
A table of contents is not a ranking factor in its own right. Its value comes from making long content easier to use, which supports better readability and engagement.
When to use one
- Long guides and pillar pages with many sections.
- Reference pages where readers look for one specific answer, such as glossaries or FAQs.
- Comparison and review pages covering several products.
Short pages with two or three sections rarely need one: it just adds clutter above the content.
How to add a good table of contents
- Write descriptive headings first. The contents list is only as useful as the headings it repeats.
- Include H2s, and H3s only if the page is very long.
- Use short, readable IDs such as
#costsrather than auto-generated strings. - Place it after a brief introduction, so the opening still answers the main question.
- Make it a standard HTML list of links that works without JavaScript.
- Consider letting readers collapse it, but keep it crawlable and visible by default.
- Test that every link lands on the right heading, including on mobile with sticky headers.
Common mistakes
- Pushing the main content far down the page with a huge contents box, which harms the above the fold experience.
- Vague headings such as “Overview” or “More info” that tell readers nothing.
- Changing heading IDs later, breaking links others have shared.
- Building the list with scripts that search engines or assistive technology cannot read.
Key Takeaways
- A table of contents links to sections further down a page.
- It helps readers navigate long pages quickly.
- Clear headings and anchors can support jump links in results.
- It is not a ranking factor in itself.
- Keep it compact, crawlable and based on descriptive headings.
Related Terms
Want help putting this into practice? Get a free SEO check, or keep learning in the SEO Encyclopedia.