A table of contents is a list of anchor links: give each H2 an id attribute, link to it with a #fragment, and place the list after the intro. No plugin or schema required, and Google can surface the anchors as jump links under your result.
The mechanics: id attributes and fragment links
Every heading you want to link to gets an id, like <h2 id="germination">. The table entry then points at <a href="#germination">. Click it and the browser jumps. That is the entire technology — no JavaScript, no plugin, though plugins can generate the ids for you. Two habits keep it working long-term. Use short, readable ids that describe the section, because those fragments appear in the URL when people share a section. And keep link text matched to the heading text, which is also what positions the anchors to appear as jump links under your search result.
Placement, and knowing when to skip it
The list goes after the opening paragraph, before the first H2, where a reader deciding whether to commit can see the whole route. A table of contents below the fold helps nobody who needed it.
Just as important: most articles should not have one. Under roughly six sections or 1,500 words, scrolling is faster than clicking and the list is furniture. The table earns its place on properly long material — grow guides, legal explainers, strain encyclopedias — where a reader arriving from search wants one specific section and would otherwise bounce rather than scroll hunting for it. Cannabis content skews this way more than most niches: a how-to-germinate guide gets visitors at every stage of the process, each needing a different chunk of the page, and the anchor list is what routes them.
Worked example: a germination guide
A 3,000-word germination guide gets this block after the intro:
- <a href="#paper-towel">Paper towel method</a>
- <a href="#direct-soil">Planting directly in soil</a>
- <a href="#water-glass">Water glass soak</a>
- <a href="#troubleshooting">When seeds will not pop</a>
- <a href="#faq">FAQ</a>
Each target H2 carries the matching id. A grower whose seeds have sat in soil for ten days clicks straight to troubleshooting, which is the section they came for. Later, the #troubleshooting fragment started appearing as a jump link under the page's Google listing, taking searchers directly there. That is the compounding return: one afternoon of anchor work keeps serving both readers and the SERP.
Key takeaways
- A table of contents is plain anchor links: heading ids plus #fragment hrefs.
- Put it after the intro, before the first H2.
- Match link text to heading text; Google can show anchors as jump links.
- Skip it under roughly six sections or 1,500 words.
Frequently asked questions
How long before a guide needs a table of contents?
My working threshold is about six H2 sections or 1,500 words. Below that, scrolling beats clicking. Above it, readers start abandoning pages they cannot navigate, and the table starts paying for itself.
Do anchor links show up in Google?
They can. Google sometimes renders jump links beneath a result that take searchers straight to a section. Clean id attributes and link text that matches the heading are what make it possible; there is no markup to request it.
Should the table of contents be sticky?
On desktop, a sticky sidebar version works well for very long guides. On mobile, use a collapsed block near the top instead, because a permanently pinned list eats too much of a small screen.
Does a table of contents need special schema?
No. It is plain HTML anchor links. The heading structure it mirrors is what search engines actually read, so spend the effort on clear H2s rather than hunting for a markup type that does not exist.
Want this done for your brand?
We build cannabis & CBD search visibility with full transparency, for dispensaries, brands, and MSOs.
Get a free cannabis SEO audit ›