How To Add A 'Table Of Contents' - TOC in Blogger Post In 2021?
Tags: blogger, webdev, tutorial
Published: 2021-10-20 15:19:18

<p>When you write or publish a post or article to your post, if it has a <b><a href="https://imamuddinwp.blogspot.com/2021/10/how-to-add-a-table-of-contents-toc-in-blogger-post.html" target="_blank">Table Of Contents</a></b> aka TOC; the post looks more professional and also creates SEO value. In this post, I'll try to cover how to add a table of contents TOC in blogger posts.</p>
<img alt="how-to-add-table-of-contents-in-blogger-post-imamuddinwp" src="https://blogger.googleusercontent.com/img/a/AVvXsEhUUFIvPBgMswM61MFFxEyLplkkedB_1hvCKXEDrq3NtUhQCUazFmHiN-dW19glPbkIgynmVgB0jnuqVKF239uQGe2amfjAsFxN8OZ0Z7g7TeU9XG_9YHul4An0_zGQwyNDMC6htvhqjSlXg316pHPqrpYShIjP-8afSdkF-q87L4b76cN_ACjgT0LtiQ" />
<h2>Table Of Contents TOC in Blogger Post In 2021</h2>
<p> For Good ranking, it's very important and also Good for SEO. I think it is very important for all bloggers who have a blog on the&nbsp;<b><a href="https://www.thebalancesmb.com/what-is-a-blogging-platform-2531835" target="_blank">blogger platform</a></b>. So Let's start to know how to add the TOC table of contents to your blogger post.</p>

<h3>What is a Table Of Contents - TOC? </h3>
<p>Whenever you are reading this paragraph, I think you have already noticed '<b>Table Of Contents TOC</b>' in this post! And it is also a <b><a href="https://medium.com/geekculture/how-to-create-clickable-table-of-contents-for-your-medium-posts-e81e22f83142" target="_blank">Clickable Table Of Contents</a></b>! Right? By the way, in general, the title of the paper at the very top, followed by the chapter names and subtitles in chronological order is known as <b><a href="https://www.bachelorprint.eu/academic-writing/table-of-contents/" target="_blank">Table Of Contents</a></b>. So a table of contents in blogger means basically a quick link or a jump link that helps the readers to skip to a specific part or heading with a single click. It highlights the parts of the blog post in order to improve the user experience.</p>

<h3>How to Use Table of Contents on the Website? </h3>

<p>Based on the website platform, there are many ways to add TOC to different websites. As an example, In the&nbsp;<b><a href="https://ithemes.com/tutorials/what-is-wordpress/#:~:text=WordPress%20is%20a%20free%2C%20open,website%20builder%20in%20existence%20today." target="_blank">WordPress platform</a></b>, there are many plugins for the table of contents like: </p>
<ul>
	<li><a href="https://mythemeshop.com/plugins/wordpress-shortcode/" target="_blank">WP Shortcode Pro</a></li>
	<li><a href="https://wordpress.org/plugins/easy-table-of-contents/" target="_blank">Easy Table of Contents</a></li>
	<li><a href="https://elementor.com/blog/table-of-contents/" target="_blank">TOC Pack – Table of Contents for Elementor</a></li>
	<li><a href="https://ultimateblocks.com/" target="_blank">Ultimate Blocks</a></li>
	<li><a href="https://theluckywp.com/product/table-of-contents/" target="_blank">LuckyWP Table of Contents</a></li>
	<li><a href="https://www.campcodes.com/wordpress/plugins/elementor-pro-full-template-kits-premium-wordpress-plugin/" target="_blank">Elementor Pro</a></li>
	<li><a href="https://wordpress.org/plugins/table-of-contents-plus/" target="_blank">Table of Contents Plus</a></li>
</ul>
<p>Nowadays like <a href="https://rankmath.com/kb/table-of-contents/" target="_blank">RankMath</a> most of the popular <b><a href="https://www.wpbeginner.com/showcase/9-best-wordpress-seo-plugins-and-tools-that-you-should-use/" target="_blank">SEO Plugins</a></b> offer you to use it.</p>

<p>In the blogger platform, some premium blogger templates allow to use of Table Of Contents; But in this post, I'll describe <b><a href="https://www.freecodecamp.org/news/how-to-add-a-table-of-contents-to-your-blog-post-or-article/" target="_blank">how to add the table of contents to your blogger post for free. </a></b></p>

<h3>SEO-Value Of TOC</h3>

<p>As you may know '<b><a href="https://www.forbes.com/sites/steveolenski/2017/06/21/why-content-will-always-always-king/" target="_blank">Content Is King!</a></b>' or content is most important for <b><a href="https://moz.com/beginners-guide-to-seo" target="_blank">SEO</a></b>, search engines won't have enough information to index your web pages correctly and help you rank if you don't have content. Adding a <b><a href="https://en.wikipedia.org/wiki/Table_of_contents" target="_blank">table of contents (TOC)</a></b> to your blogger blog post will improve SEO in many ways like improvement of the usability of your post, once it's easier for the reader to see the data you cover in your post and supply a way for the reader to jump to sections of interest, the reader can spend more time on your page.</p>
<blockquote>A blog post with a 'Table Of Contents' has a more professional appearance, stunning, and  Eye-Catching look than a post without one.</blockquote>
<p>A good table of contents will be easy to read, accurately formatted, and completed last so that it is 100% accurate to readers. So, I think you would not skip TOC to your blog post. </p>

<h4>Get Jump Links in Google Search</h4>

<p>As per the experiences of professional SEO experts, Google may include a '<b>Jump To</b>' link in the <b><a href="https://mailchimp.com/marketing-glossary/serp/" target="_blank">SERP</a></b> when it finds a table of contents in an article. It helps to improve CTR tremendously. Google treated it at its discretion, like rich snippets, by simply including a table of contents, there is no guarantee that you will get the 'Jump To' links. It is actually very beneficial especially for the large article with multiple headings. SEO Experts strongly recommend using the '<b><a href="https://examples.yourdictionary.com/reference/examples/table-of-content-examples.html" target="_blank">Table Of Contents</a></b>' in post for your website's visitors.</p>

<h5>Advantages Of Using Table Of Contents TOC In Blog Post</h5>
<p>In a blog post, table of contents links are not new either but one that provides several values regardless of how search engines include them in <b><a href="https://backlinko.com/hub/seo/serps" target="_blank">SERP</a></b>. A well-planned TOC can help us below ways:</p>
<ul>
<li>Increase user experience to your website.</li>
<li>Show your contents well-structured, and well-formatted.</li>
<li>Helps to navigate easily between different content parts.</li>
<li>Increase <b>CTR</b> from search</li>
<li>Provide a clear and easy road map to visitor</li>

</ul>
<h3>How to add a simple table of content in blogger posts?</h3>

<p>So, now we will follow below simple guide to add a TOC to our blogger post. Get set ready to do it correctly by following some easy steps. </p>
<p><b><i>Disclaimer:</i></b> before you apply these steps, you should take a backup to your blogger template. It's very simple to backup. You may read this to backup your blogger website: <b><a href="https://support.google.com/blogger/answer/41387?hl=en" target="_blank">Back up or Import Your Blog</a></b>. I have added the below image to understand how to back up your blogger template or blogger website from the blogger dashboard.</p>
<img alt="backup-blogger-website-imamuddinwp" src="https://blogger.googleusercontent.com/img/a/AVvXsEgfs7kbH3Z6rm3e16jwOlYMj2oa2mur7Ii3xssSEKlISpdKCTqhQI6rO1u1Vt2rb7MK2Xsr4a2fOgRq42AVbcsLd2wr6RX4IEXxznTZalApAqWzoZrwYjdy56yyQwRUyQiX9MCoVfiuD2cUsWSHiNZ0GdmwvXFSpuFBfzpjaa6GjYrFX7bwC7qGk_F-5A" />

<h4>Steps to create TOC In Blogger:</h4>

<ol>
<li>Go to your blogger dashboard by login to the blogger</li>
<li>Go to '<b>Edit HTML</b>' from the 'Theme' option</li>
  <img alt="edit-html-blogger-template-blogger-theme-imamuddinwp" src="https://blogger.googleusercontent.com/img/a/AVvXsEgiVQK4cifLjoSLTl4gb-ce_L7phJ4umdA2g4i1kscOYZWTeILVP5IxNo75IGM4l5C9RhSKSGllrD1jVkkXDsqbGLyNyvQLbqt9MhOfPEbkA2d5KnHd4APTkF41aiF0GfdvQWZccEWfQ-m7mcHqoT41bicplW8V4-R3-DUzj8YTLQ4HB5wzRC2Ld9eYzw" />
<li>Then search <b>&lt;/head&gt; </b></li>
<li>After that Copy the following code and paste above  <b>&lt;/head&gt;</b></li>
</ol>



<pre class="wp-block-code"><code>&lt;!-- Table of contents Javascript start--&gt;

 &lt;script type='text/javascript'&gt;              
//&lt;![CDATA[           
//*************TOC plugin by MyBloggerTricks.com           
function mbtTOC() {var mbtTOC=i=headlength=gethead=0;           
headlength = document.getElementById("post-toc").getElementsByTagName("h2").length;for (i = 0; i &lt; headlength; i++)           
{gethead = document.getElementById("post-toc").getElementsByTagName("h2")[i].textContent;document.getElementById("post-toc").getElementsByTagName("h2")[i].setAttribute("id", "point"+i);mbtTOC = "&lt;li&gt;&lt;a href='#point"+i+"'&gt;"+gethead+"&lt;/a&gt;&lt;/li&gt;";document.getElementById("mbtTOC").innerHTML += mbtTOC;}}function mbtToggle() {var mbt = document.getElementById('mbtTOC');if (mbt .style.display === 'none') {mbt .style.display = 'block';} else {mbt .style.display = 'none';}}           
//]]&gt;              
&lt;/script&gt;
&lt;!-- Table of contents Javascript end --&gt;
</code></pre>



<ol>
	<li>After that search (by typing '<b>Ctrl+F</b>' in keyboard) <b> ]]&gt;&lt;/b:skin&gt;</b></li>
	<li>And copy the following code and paste above <b>]]&gt;&lt;/b:skin&gt;</b></li>
</ol>

<pre class="wp-block-code"><code>.mbtTOC{border:5px dashed dodgerblue;box-shadow:2px 0px 10px 4px silver;background-color:#f2f2f2;color:black;line-height:1.4em;margin:30px auto;padding:20px 30px 20px 10px; font-family:oswald, arial;display: block;width: 70%;}           <br />.mbtTOC ol,.mbtTOC ul {margin:0;padding:0;}           <br />.mbtTOC ul {list-style:none;}           <br />.mbtTOC ol li,.mbtTOC ul li {padding:15px 0 0; margin:0 0 0 30px;font-size:15px;}           <br />.mbtTOC a{color:#0080ff;text-decoration:none;}           <br />.mbtTOC a:hover{text-decoration:underline; }<br />.mbtTOC button{background:#f2f2f2; font-family:oswald, arial; font-size:20px;position:relative; outline:none;cursor:pointer; border:none; color:black;padding:0 0 0 15px;} <br />.mbtTOC button:after{font-family:FontAwesome; position:relative; left:10px; font-size:20px;}<br /><br /></code></pre>

<p>Here I have attached an image for a better understanding of TOC in the blogger theme!</p>
<img alt="table-of-contents-toc-in-blogger-theme-imamuddinwp" src="https://blogger.googleusercontent.com/img/a/AVvXsEh1HH5fh0qoXAUm8rg2L8GL0pKRHwxwWYo08gF5HyfcMr0JRABEM4c1dtqvnGG0-SHCSs0dFDuwzFL5gjCpm4SJ6vfbkChAvb7ogee0lF1lQetpZ5Cu4teqXZPxBcTwZ5_BArAO4wQsK4Yyoq6akjeTj5kTqqgedkJToHWPIpmoFVAcvaSLKsWoXwVfcg" />
<ol>
	<li>After That search for <b>&nbsp;&lt;data:post.body/&gt;</b></li>
  
  
</ol>
<p><b><i>Note:-</i></b> You might found <b>more than one code</b>, simply replace the codes with the following codes:</p>

<pre class="wp-block-code"><code>&lt;div id="post-toc"&gt;&lt;data:post.body/&gt;&lt;/div&gt;</code></pre>

<ol>
<li>After doing all the steps, just save the theme.</li>
<li>Go to Blogger Dashboard.</li>
<li>Choose your desired post to apply to TOC.</li>
<li>Open in <b>HTML View</b></li>
<li>Choose the right place to show TOC.</li>
<li>Copy the Code and paste those places.</li>
</ol>
<pre class="wp-block-code"><code>&lt;div class="mbtTOC"&gt; <br />    &lt;button onclick="mbtToggle()"&gt;Table Of Contents ✓&lt;/button&gt; <br />    &lt;ul id="mbtTOC"&gt;&lt;/ul&gt; <br />    &lt;/div&gt;</code></pre>


<ol>
	<li>After that, go to the bottom of the post by scroll down. </li>
	<li>Be sure the post is in <b> HTML view</b></li>
	<li>Copy the java scripts </li>
	<li>Paste the code under the post where the post will end.</li>
</ol>
<code>
<pre class="wp-block-code"><code>&lt;script&gt;mbtTOC();&lt;/script&gt;</code></pre>
</code>
<p>See the below image for a better understanding of the HTML view from my blog post: </p>
<img alt="blogger-theme-post-html-view-imamuddinwp" src="https://blogger.googleusercontent.com/img/a/AVvXsEggo9DbfTBgnY58X1e7PPSWrGHOXujpLja-5epF2X_PAwRIFyGP8XdesuMZenSTpBkSutxIBGE8P37EIeFhMu9_h15rCqfrcbnJJPZ3p1fhVnbMlw10L6JeH-BW1KtxJL_GvTtDXJ1MlpeHyildpRWb_ycNJGskx1rR5byfFIKLi8hQ_NJ6UrSoB2jY1A" />

<p>Also please see it:</p>
<img alt="table-of-contents-toc-in-blogger-post-imamuddinwp" src="https://blogger.googleusercontent.com/img/a/AVvXsEjPDvN2MZWTuaAFdYQ0kQC6mjTWl3oeant2iZo0IU68lzeXPwslq1AsGeMG4nWioWhzvj5fN2ZUTI7izxHDuk-RyjBPy-IEnYmC9rXe6T4D0X15N-JvODzxe5fcNTMoAwVnUoJlrdhiLVKBPIWYrucojl-OZhODgNpIsbESBZwPePcpAaFkwGXfsYL8fQ" />
<p>After completing all these steps, just save your post.<b> You Are All Done!</b> Now you can see the <b><a href="https://devexpress.github.io/dotnet-eud/interface-elements-for-web/articles/rich-text-editor/table-of-contents.htmlhttps://devexpress.github.io/dotnet-eud/interface-elements-for-web/articles/rich-text-editor/table-of-contents.html" target="_blank">Table of Contents -TOC</a></b>  in Your Blog post. Here I have attached a screenshot of TOC from this post. </p>
<img alt="table-of-contents-toc-in-blogger-post-imamuddinwp-" border="0" data-original-height="313" data-original-width="599" src="https://blogger.googleusercontent.com/img/a/AVvXsEj0A-9k4b-q40nj95culRGKigv-HdgekK09uXiI8dfRDkH2T7ulCi5qgOU6fGpXsRuaAgjK8oZ4usUVSqa-Nlpw9FYmCNYkPr2HSYJcwpUc6vsVZN_cxjZZQppbgPyFs8KjUNlnmulN12-FAJO-eAB-1cW3VNmwWB1WvoYT_GUo6ptH12EetwpLzn-TEw" />

<h3>Pro Tips For Smooth Scrolling Of TOC</h3>

<p>For easy smooth scroll and eye-catching scroll, you can easily add '<b><a href="https://www.w3schools.com/howto/howto_css_smooth_scroll.asp" target="_blank">smooth scroll effects</a></b>' to the Table of contents. It will also work as a smooth scroll on the whole website for any jumping links. </p>

<p>Just add the below CSS file to your blogger theme above the   <b>]]&gt;&lt;/b:skin&gt;</b> tag or paste it in the "<b>add CSS</b>" section of your blogger theme customizer. </p>
<pre class="wp-block-code"><code>
html{
	scroll-behavior: smooth;
}
@media (prefers-reduced-motion:reduce){
	html{
		scroll-behaviour: auto;
	}
}
</code></pre>
<p><b>Conclusion:- </b> If you face any problems in adding a&nbsp;<b><a href="https://imamuddinwp.blogspot.com/2021/10/how-to-add-a-table-of-contents-toc-in-blogger-post.html" target="_blank">table of contents in your blogger post</a></b>, just comment here with details. I'll try my best to solve it asap. Thanks for reading this post, powered by <b><a href="https://imamuddinwp.blogspot.com/p/about.html" target="_blank">Imam Uddin; imamuddinwp</a></b>. </p>