Tutorial

How Do I Add a Table of Contents to Long Webflow Blog Posts?

Written by
Pravin Kumar
Published on
Jul 24, 2026

How do I add a table of contents to a long Webflow blog post?

The simplest reliable way is to add a script that reads your headings and builds the list of links for you. On a long CMS post, a tool like Finsweet Attributes Table of Contents scans your H2 and H3 headings and turns each one into a clickable anchor link. You do not hand-code every link.

I get asked this a lot because long posts are hard to skim without one. A reader lands on a two thousand word guide, cannot see the sections at a glance, and bounces. A table of contents fixes that in a few minutes of setup.

Let me walk through why this is trickier in Webflow than it looks, and the two honest ways to solve it. One is almost no code, and one gives you full control.

What is a table of contents, and why add one?

A table of contents is a small list of links near the top of a post that jumps the reader to each section. It works using anchor links, which scroll the page to a specific heading. For long guides, it gives readers a map, speeds up skimming, and shows the full scope of the piece up front.

The benefit is mostly about attention. Most people scan before they commit to reading. If they can see that your post covers the exact question they have, they stay. If they cannot find it fast, they leave and click the next result.

There is a second benefit that matters in 2026. A clear heading structure helps machines understand your page too, which feeds both search and AI answers. A good table of contents is really just a visible sign of good structure underneath.

Why is this trickier inside Webflow CMS rich text?

Because anchor links need an ID on each target heading, and Webflow adds IDs in the Designer, not inside a CMS rich text field. Per Webflow's own guidance, to link to a heading you give that element a unique ID. Inside rich text, you cannot set those IDs by hand in the CMS editor, so you need another approach.

This trips up a lot of people. They build a beautiful static page with anchor links, then try the same thing in a CMS blog and hit a wall. The rich text field holds all your headings as one block, and the editor does not expose an ID field for each one.

So the question becomes how to generate those IDs and links automatically, after the page loads. That is exactly what a script does. It reads the finished headings in the browser and wires up the anchors for you, which sidesteps the CMS limitation cleanly.

What is the easiest way to build a Webflow table of contents?

Use Finsweet Attributes Table of Contents. It is a JavaScript attribute system that parses the heading elements inside a Webflow rich text block and generates clickable anchor links automatically. It handles smooth scrolling and highlights the active section using Webflow's native Current state, so you get a polished result without writing the logic yourself.

I reach for this on most client blogs because it is fast and dependable. You add the Finsweet script to your site, mark your rich text as the content source, and drop in a small component that will hold the generated links. The tool does the parsing.

The honest tradeoff is that you are relying on a third party script and its attributes. For most sites that is a fine trade, because Finsweet is widely used in the Webflow community and well documented. If you want zero dependencies, the custom code route is next.

How does the Finsweet approach actually work?

It works after the page loads. The script scans your rich text for heading tags, usually H2 through H6, assigns each one an ID, and builds a matching list of links. When a reader clicks a link, the page scrolls smoothly to that heading. As they scroll, the current section link highlights so they always know where they are.

The key setup detail is your attributes. You tell the script which element is the content to scan and which element should receive the generated list of links. Once those two roles are marked, the tool connects them every time the page loads, including on every CMS post.

Because it reads the live headings, it stays in sync automatically. Add a new section to a post, and the table of contents updates itself the next time the page loads. There is nothing to maintain by hand, which is the whole point.

Can I build one with custom code instead?

Yes, and it is not much code. A short script can loop through the headings in your rich text, give each one an ID, and build a list of links that scroll to them. The community has shared versions that do this in roughly fifteen lines. You get full control and no outside dependency.

I choose this route when a client wants to avoid third party scripts or needs custom behavior. Maybe they only want H2 headings in the list, or a specific scroll offset so the heading is not hidden under a sticky navbar. Custom code makes those tweaks easy.

The cost is that you own it. If Webflow changes something or a heading structure is unusual, you are the one debugging it. For a solo site that is usually fine. For a client I am handing off, I weigh whether they can maintain it later. I think about this the same way I approached my scroll progress indicator for Webflow blog templates.

How should I structure my headings for a good table of contents?

Use a clean, logical heading hierarchy. Make your main sections H2 and any sub-points H3, and never skip levels just to change the look. A table of contents is only as good as the structure it reads. Tidy headings give you a tidy list, and messy headings give you a messy one.

Write your headings as clear, specific phrases rather than clever labels. A reader scanning the list should understand each section from its heading alone. Vague headings like Overview or More make a table of contents useless, because they tell the reader nothing.

This discipline pays off beyond the table of contents. Question-shaped headings with direct answers underneath are also what AI engines look for. I covered that format in my guide on writing answer blocks that get cited by AI, and a table of contents is a natural companion to it.

Does a table of contents help with SEO and AI citations?

Indirectly, yes. A table of contents itself is not a magic ranking factor, but the clean heading structure behind it helps search engines and AI models understand your page. It can also support jump-to links in some search results, and it keeps readers on the page longer, which is a healthy signal.

The real win is structure. When your page is organized into clear, well-named sections, an AI engine can find and lift the exact chunk that answers a question. A table of contents is the visible proof that this structure exists, both for people and for machines.

So I do not add one just for search points. I add it because it makes long content usable, and usable content is what earns links, citations, and return visits. The SEO benefit is a byproduct of respecting the reader's time.

What should you do next?

Pick your longest blog post and add a table of contents to it this week. Try Finsweet Attributes first for speed, and only reach for custom code if you need tighter control. Then check that your headings are clean H2 and H3 tags, because that structure is what makes the whole thing work.

Start with one post, confirm it scrolls smoothly and highlights the right section, then roll it out across your blog template so every future post gets one automatically. That template step is what turns a one-time fix into a lasting improvement.

If you get stuck wiring up the attributes or your headings are a tangle from years of edits, that is the kind of cleanup I do all the time. Reach out through pravinkumar.co and I will help you get it working.

Get found, cited and the back office automated

Let's make your site the source AI engines quote and wire up the systems behind it.

Contact

Let's get your website found and cited by AI

Tell me what you're working on, whether AI search is skipping your product, your back office is buried in manual work, or you need a build that does both.

Got it, thanks. I read every message personally and reply within 1-2 business days.
Oops! Something went wrong while submitting the form.