Skip to content

Design5 min read

Add a table of contents in Webflow

Video

Finsweet attributeWebflow elementValue
fs-toc-elementRich Textcontents
fs-toc-elementTable of contents linklink
fs-toc-offsetTable of contents wrapperYour nav height (e.g. 80)

Why add a table of contents to your blog posts?

The Gemeos Webflow agency explains why it’s important to add a table of contents to a blog post:

  1. Make navigation easier: a table of contents helps readers quickly find the sections they care about without having to read the whole article. It can improve the reading experience and keep people on your blog longer.
  2. Improve readability: a well-structured table of contents can make your article clearer and easier to follow. That matters even more if your article is long or complex.
  3. Boost SEO: a table of contents helps search engines understand your article structure and rank it better in search results. That can potentially increase traffic to your blog.
  4. Show you’ve thought about your reader: by adding a table of contents, you show that you’ve considered your readers’ needs and want to give them a smooth, efficient reading experience in the spirit of SXO.

In short, adding a table of contents to your blog post can improve navigation, readability, SEO, and show your commitment to your readers.

Also check out the 9 steps to optimize your Webflow site for SEO

1. Add this script in the <head> of your page

< script defer src="https://cdn.jsdelivr.net/npm/@finsweet/attributes-toc@1/toc.js">

2. Add a "contents" attribute to the <Rich Text> element in your blog post

4. Publish your site and test the result

Bonus 1: Style the active state of your table of contents

The current state of generated table of contents links works with Webflow’s native current state.

To edit the "Current state" class in Webflow Designer:

  • Look for the green "Current" class to appear in the Style panel (add the current page link in your link settings)
  • Apply the current/active styles to the link. These styles will be used when a link is active while scrolling through the table of contents.

Bonus 2: Add an offset

When a user clicks a table of contents link, the page anchors and scrolls to that content section. This attribute adds top spacing above the content heading. Especially handy when your Heading ends up hidden behind your navigation bar.

Published on Apr 10, 2025

Sandro DA SILVA

Growth Marketer, Webflow expert, and jack-of-all-trades. Sandro handles commercial operations, ensures projects run smoothly, and addresses marketing-related issues (SEO, Tracking, Copywriting, etc).

You're going to working with us, guaranteed

Ready to launch your business?

get a quote

Let’s f*****G GO !!