How to add a table of contents to Blogger posts in 2026 — automatic TOC guide.

 

A table of contents is a small box at the top of a post that lists its headings — and lets readers jump straight to the section they need. On a long guide, it is the difference between a reader who finds the answer in ten seconds and a reader who scrolls, gives up, and leaves. It also helps Google understand the structure of your post, and it makes your blog look organised and professional.

This guide shows how to add a table of contents to your Blogger posts in 2026. There are two ways to do it: an automatic table of contents, which builds itself from your post's headings, and a manual one, which you write by hand for a single post. The automatic way is better for most blogs, because you set it up once and it works on every post. The manual way is useful when you want full control over one important post.

If you have not added a meta description to your posts yet, do that first — our guide to adding a meta description in Blogger explains it, and it pairs well with a table of contents, because both help readers and Google understand what a post is about.

Why Add a Table of Contents?

A table of contents helps in four ways, and none of them is cosmetic.

Readers find answers faster. Most readers do not read a long guide from start to finish. They arrive with one question, and they want the section that answers it. A table of contents shows them where that section is. This is especially true for tutorials and recipe posts — a reader who wants the ingredients or step 4 does not want to read the introduction first.

Readers stay longer. A post that looks long and unbroken is intimidating. A table of contents breaks it into visible sections and tells the reader what is inside. Readers who can see the structure are more likely to stay and read more than one section.

Google understands your post better. Headings are how Google reads the structure of a page. A table of contents built from those headings reinforces that structure, and Google may show your headings as jump links in search results — a small listing that takes up more space and gets more clicks. Our guide to writing SEO-friendly blog posts on Blogger explains how headings and structure affect ranking.

It makes your blog look professional. A blog with a table of contents looks like a publication that cares about its readers. A blog without one, with long unbroken posts, looks unfinished — and AdSense reviewers notice the difference. See our guide to AdSense approval requirements for Blogger for what else reviewers check.

Before You Start: Use Proper Headings

A table of contents only works if your posts use proper headings. This is the step most people skip, and it is the reason most table of contents setups fail.

In the Blogger post editor, your post title is the main heading. Inside the post, use Heading (H2) for your main sections and Subheading (H3) for sub-sections inside them. Do not use bold text as a heading — bold text looks like a heading to a reader, but Blogger and Google do not treat it as one, and an automatic table of contents cannot see it.

A good structure looks like this:

  • Post title (H1, automatic)
  • Introduction (plain text)
  • First main section (H2)
  • A sub-section inside it (H3)
  • Second main section (H2)
  • Frequently Asked Questions (H2)
  • Final Thoughts (H2)

If your existing posts use bold text instead of headings, fix the headings first. It takes a few minutes per post, and it improves both the table of contents and your search ranking. Our guide to writing your first blog post on Blogger shows how to structure a post with headings from the start.

Method 1: Automatic Table of Contents (Recommended)

An automatic table of contents is added once, in your template, and then appears on every post that has headings. You do not need to add anything to each post. This is the method to use if you want it on all posts.

Step 1: Back up your template

Before you edit your template, back it up. Go to Theme, click the arrow next to Customise, and choose Backup, then Download. Save the file somewhere safe. If anything goes wrong, you can restore it in a minute. Our complete backup guide covers this in detail, and it is worth doing before any template change, not just this one.

Step 2: Add the table of contents code to your template

Go to Theme, click the arrow next to Customise, and choose Edit HTML. Find the place in your template where a post begins — in most Blogger templates this is near the post body, just before the code that shows the post content. This step varies by template, so work carefully: use the editor's search (Ctrl+F) to find the post body section, and add the table of contents container just above it.

Many templates already have a table of contents feature built in — check your template's settings or documentation first. If your template has one, turn it on there instead of adding code by hand; it will already be styled to match your design. The Spotlight theme used on Culvix, for example, has its own layout options, and a built-in feature is always safer than a hand-added script.

1. The container — add it just before the post body in the template:

<div class="cvx-toc" id="cvx-toc" style="display:none">
  <strong>On this page</strong>
  <ul id="cvx-toc-list"></ul>
</div>

2. The style — add it to the template CSS:

.cvx-toc{background:#f7f9fc;border:1px solid #dbe3ee;border-radius:8px;padding:14px 18px;margin:0 0 20px;width:100%;box-sizing:border-box}
.cvx-toc strong{display:block;margin-bottom:8px;font-size:16px}
.cvx-toc ul{margin:0;padding-left:18px}
.cvx-toc li{margin:4px 0;line-height:1.5}
.cvx-toc li.cvx-toc-h3{margin-left:16px}
.cvx-toc a{color:#0a53a8}
.post-body h2,.post-body h3{scroll-margin-top:80px}

3. The script — add it just before </body> in the template:

<script>
(function(){
  var body=document.querySelector('.post-body')||document.querySelector('article')||document.body;
  var box=document.getElementById('cvx-toc');
  var list=document.getElementById('cvx-toc-list');
  if(!body||!box||!list) return;
  var heads=body.querySelectorAll('h2,h3');
  if(heads.length<2) return;
  var seen={};
  function slug(t){
    var s=t.toLowerCase().trim().replace(/[^a-z0-9\s-]/g,'').replace(/\s+/g,'-').replace(/-+/g,'-');
    if(!s) s='section';
    if(seen[s]){seen[s]++; s=s+'-'+seen[s];} else {seen[s]=1;}
    return s;
  }
  heads.forEach(function(h){
    if(!h.id) h.id=slug(h.textContent);
    var li=document.createElement('li');
    if(h.tagName==='H3') li.className='cvx-toc-h3';
    var a=document.createElement('a');
    a.href='#'+h.id; a.textContent=h.textContent.trim();
    li.appendChild(a); list.appendChild(li);
  });
  box.style.display='block';
})();
</script>

If your template has no built-in option, the standard approach is a small script that reads the H2 and H3 headings in the post, builds a list of links to them, and shows that list in a box at the top of the post. You will need to add two things: a container where the list will appear, and the script that fills it. Add them one at a time, save, and check the result before you add the next — do not paste a large block of code and hope it works.

Step 3: Style it to match your blog

A table of contents should look like part of your blog, not like a box pasted on top of it. Keep the styling simple: a light background, a border, the same font as your posts, and links in your blog's link colour. Make sure it looks good on a phone — the box should be full width, not squeezed into a narrow column, and the links should be large enough to tap.

Avoid styling that hides the table of contents on mobile. Some bloggers hide it on phones to save space, but that removes it exactly where readers need it most, because phone readers scroll the most.

Step 4: Test it on several posts

Open three or four different posts: a long guide with many headings, a short post with only two or three headings, and a post with subheadings. Check that the table of contents lists the right headings, in the right order, and that clicking a link jumps to the right section. Check it on a phone as well as a computer. If a post has no headings, the box should be empty or hidden — it should not show a blank box with a title and nothing in it.

If the table of contents does not appear, the most likely causes are that the post has no H2 headings (only bold text), or that the code was added in the wrong place in the template. Check the headings first — it is the commoner cause. If the template still does not work after that, restore your backup and try again, or use the manual method below for your most important posts.

Method 2: Manual Table of Contents (For One Post)

A manual table of contents is a list you write at the top of a single post, with links to that post's sections. It takes a few minutes per post, but it gives you full control, and it needs no template change at all. Use it for your most important posts, or while you decide whether to add an automatic one.

Step 1: Give each section an anchor

In the Blogger post editor, you cannot easily add anchor links to headings in the visual editor, so the manual method works best in the HTML view. Switch a post to HTML view, find a heading, and add an id to it — for example, change <h2>Why Add a Table of Contents?</h2> to <h2 id="why-add">Why Add a Table of Contents?</h2>. Use short, simple ids with hyphens, no spaces.

Do this for each main section you want in the table of contents. You do not need to include every subheading — the main H2 sections are usually enough.

Step 2: Write the list at the top of the post

At the top of the post, below the introduction or just above it, add a short list of links to those anchors. Each link points to the id you added: <a href="#why-add">Why Add a Table of Contents?</a>. In the visual editor, you can add these as ordinary links to the anchor — but writing them in HTML view is more reliable, because you can see exactly what you are linking to.

Keep the list short. Five to eight links is enough for most posts. If a post has more sections than that, list only the main ones — a table of contents that is as long as the post defeats its purpose.

Step 3: Test every link

Before you publish or update the post, click every link in the table of contents and check that it jumps to the right section. A link to an id that does not exist will do nothing, or jump to the top of the page, and a reader who clicks it will think the blog is broken. This is a two-minute check, and it is worth doing every time.

Which Method Should You Use?

Use the automatic method if you publish regularly and want a table of contents on every post without extra work. Set it up once, test it, and forget about it — as long as you use proper headings, it will work on every new post.

Use the manual method if you only want a table of contents on a few long posts, if your template does not support an automatic one, or if you want to control exactly which sections appear. It is more work per post, but it never breaks your template.

Many bloggers use both: an automatic table of contents for the whole blog, and a manual one on a flagship post where they want a different set of links. That is fine, but do not put both on the same post — two tables of contents on one page will confuse readers.

Making Your Table of Contents Work Well

A table of contents is only useful if readers actually use it. A few habits make the difference.

Keep headings short and clear. A heading that says "How to Add Table of Contents to Blogger Posts" is useful in a table of contents. A heading that says "A Few Thoughts on a Topic I Have Been Thinking About" is not — the reader cannot tell what is in that section. Write headings that describe the section, as explained in our SEO-friendly writing guide.

Do not list every subheading. If your post has H2 sections and H3 sub-sections, list the H2 sections, and include H3s only where they are genuinely useful as jump targets. A table of contents with twenty entries is not a shortcut; it is a second post.

Put it near the top, after a short introduction. Readers should see the table of contents without scrolling far. One or two introductory sentences, then the box. Do not put it below a large image and three paragraphs of introduction — by then, the reader who needed it has already left.

Make the links obvious. Table of contents links should look like links — your blog's link colour, underlined on hover. If they look like plain text, readers will not realise they can click them.

Common Problems and Fixes

The table of contents is empty. Your post probably has no H2 or H3 headings. Check that you used the Heading option in the editor, not bold text. Fix the headings, update the post, and the table of contents should appear.

The links jump to the wrong place. This usually happens when two headings have the same text, or when the automatic script generates the same id for two sections. Make your headings distinct — do not use "Tips" as a heading in three different places — and the links will work.

The box looks broken on a phone. The styling is probably fixed-width. Change it to full width on small screens, and check that the text does not overflow the box. If you added the code yourself, check the styling in your template's CSS.

The table of contents appears on pages, not just posts. Some template edits add the box to static pages as well as posts. If your About or Contact page suddenly has an empty table of contents box, your code is in the wrong place — it should only run on post pages. Restore your backup and place it inside the post section only. Our guide to adding About, Contact and Privacy pages explains how static pages differ from posts.

The template broke after editing. Restore your backup immediately — do not try to fix a broken template by guessing. Go to Theme, Restore, and upload the backup file you saved in Step 1. Then try again more slowly, one change at a time. If the template still will not work, see our guide to fixing a Blogger template that is not working.

Frequently Asked Questions

Does a table of contents help SEO?

It helps indirectly. It does not add keywords, but it improves how readers use your post, it reinforces the heading structure Google reads, and Google may show your headings as jump links in search results. Combined with good headings and a clear structure, it is a genuine SEO improvement — see our guide to getting your Blogger posts indexed fast for the other steps that matter.

Should every post have a table of contents?

No. Short posts with two or three sections do not need one — there is nothing to jump to. Add it to long posts, guides and tutorials, where readers need to find a specific section. A table of contents on a 300-word post looks odd and adds nothing.

Will a table of contents slow down my blog?

An automatic table of contents adds a small script to your template, but the effect on speed is tiny compared with images and widgets. If your blog is slow, the cause is almost certainly elsewhere — see our speed guide.

Can I add a table of contents without editing the template?

Yes — use the manual method above. It needs no template change, works on any template, and is the safest option if you are not comfortable editing HTML. The only cost is a few minutes per post.

Does Blogger have a built-in table of contents feature?

Blogger itself does not add a table of contents automatically, but many modern Blogger templates include one as a feature. Check your template's settings or documentation before adding code by hand — a built-in option is always safer and already styled to match.

Final Thoughts

A table of contents is a small change with an outsized effect: it respects your reader's time, it makes long posts usable, and it makes your blog look like a publication. Set up the automatic version once, use proper headings in every post, and let it work for you on every guide you publish.

Next, make sure those guides are actually found: our guide to getting your Blogger posts indexed fast on Google covers the steps that get a new post into search results quickly, and our food blog templates guide shows how a good layout makes a post worth reading once it is found.