Skip to main content

How to add table of content in Blog post

How to add table of content in Blog Post- If you want to categorize your content and put it in a systematic way in your blog post, then you should go for the table of content. Your user can access any particular element of your blog immediately according to his interest.

Let me show you how good Table of Content looks and gives your blog an attractive look.

Table of Content

So let's dive in and learn How to add table of content in Blogger?

Benefits of Table of Content

The table of content help you in a lot of ways, it has a lot of benefits as well as it helps you enhance your SEO. 
  • It arranges your data systematically.
  • It enhances your readability.
  • It has a good impact on your user.
  • Gives a free-hand to the user to access your blog easily.
  • It enhances your SEO
  • It makes the blog content look attractive.

SEO Benefits of Table of Content

As we all know that Google always prefers well structured and organized data, then if your blog post contains a table of content and you make your data organized in it, it will help to improve your SEO as well.

How to add Table of Content?

There are a few steps, that you can follow and add a table of content in your blog.
You have to follow all the steps as mentioned below to create a beautiful and attractive table of content.

Step 1:- First of all open your blogger dashboard and go to the theme section.

Table of Content


Click on Edit HTML button

Step 2:- Now you will be redirected to the page where you can edit your theme. Now you have to click at the random line of coding in your theme and then press Ctrl+F and then a search box will pop up on the top right side of the theme in which you have to search </head>  as shown in the image below.

Table of content

Step 3:- When you see the search result on your screen you had to copy the code which is given below, above </head> line.

<link href='http://fortawesome.github.io/Font-Awesome/assets/font-awesome/css/font-awesome.css' rel='stylesheet'/>           

<link href='http://fonts.googleapis.com/css?family=Oswald' rel='stylesheet' type='text/css'/>


<script type='text/javascript'>              

//<![CDATA[                      

function mbtTOC() {var mbtTOC=i=headlength=gethead=0;           
headlength = document.getElementById("post-toc").getElementsByTagName("h2").length;for (i = 0; i < headlength; i++)           

{gethead = document.getElementById("post-toc").getElementsByTagName("h2")[i].textContent;document.getElementById("post-toc").getElementsByTagName("h2")[i].setAttribute("id", "point"+i);mbtTOC = "<li><a href='#point"+i+"'>"+gethead+"</a></li>";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';}}           
//]]>              
</script>


Step 4:- When you paste the code successfully above the given line then you have to search this in your search box again as shown in the picture below.

]]></b:skin>


Table of content


Step 5:- After searching and getting the result again you have to paste the code given below above the searched line.

.mbtTOC{border:5px solid #f7f0b8;box-shadow:1px 1px 0 #EDE396;background-color:#FFFFE0;color:#707037;line-height:1.4em;margin:30px auto;padding:20px 30px 20px 10px; font-family:oswald, arial;display: block;width: 70%;}           
.mbtTOC ol,.mbtTOC ul {margin:0;padding:0;}           
.mbtTOC ul {list-style:none;}           
.mbtTOC ol li,.mbtTOC ul li {padding:15px 0 0; margin:0 0 0 30px;font-size:15px;}           
.mbtTOC a{color:#0080ff;text-decoration:none;}           
.mbtTOC a:hover{text-decoration:underline; }

        
.mbtTOC button{background:#FFFFE0; font-family:oswald, arial; font-size:20px;position:relative; outline:none;cursor:pointer; border:none; color:#707037;padding:0 0 0 15px;}           

.mbtTOC button:after{content: "\f0dc"; font-family:FontAwesome; position:relative; left:10px; font-size:20px;}

Step 6:- After pasting the code, again you have to search this code in your theme as shown in the image below.


<data:post.body/>
NOTE:- How many times this code is in your theme, you have to replace them all.


Table of Content


Step 7:- Then replace the searched code by the code given below.

<div id="post-toc"><data:post.body/></div>

Step 8:- After doing this, you have to click on the save theme option, which is above the coding area.

Step 9:- After doing all of this you have to go to your post where you want to place the content table and then go to the HTML section of the code.

Table of Content


Step 10:- Now, you have to paste the code given below in the HTML section, where you want to show your content table in your post. As shown in the photo below.

<div class="mbtTOC"> 
    <button onclick="mbtToggle()">Table Of Contents</button> 
    <ul id="mbtTOC"></ul> 

    </div>

Table of Content


Step 11:- Then go to the end of the HTML section and copy the code given below in the last line of the coding in the HTML section.

<script>mbtTOC();</script>

NOTE:- Whatever you want to show in your content table, you have to write them in Heading form, otherwise they will not be shown in your content table.

After doing the steps mentioned above you can add an attractive table of content in your blog and can make your blog more contentful and align.
I hope you like our post on How to add table of content in Blogger then share it with your friends and on social media platforms like Facebook, Whatsapp, and Instagram.



Comments

Popular posts from this blog

Lockdown 4.0 - Everything you should know

As we all know that for the last 48 days we have been inside our homes because of the lockdown, and everyone is thinking that when all this will end and when we will be able to start our former life back. How many such questions come to our mind in the day, but we also have to admit that after Lockdown 3.0, now we have all stood on the verge of Lockdown 4.0.
We have many questions and thoughts and thoughts in our mind regarding our life, daily routine, and obviously our job like:-

Will Lockdown 4.0 take place or not?If applied, how long can it take?Which people will get relief in this?Which services will remain operational?
Why is Lockdown 4.0 important?
See, it is clear that the lockdown is in the interest of the country if the proper steps are not taken by our government at the right time, then the problem in our country could have increased further, but to a large extent, the situation in our country is under control and in comparison with other countries we are in a much better pos…

Biography of PrithviRaj Chauhan

Prithviraja III, popularly known as Rai Pithora or Prithviraj Chauhan was a king from Chahamana (Chauhan) dynasty. He was one of the greatest Rajput rulers, who controlled many parts of Rajasthan, Delhi, Haryana, Madhya Pradesh, and Uttar Pradesh. His capital was located at Ajayameru, popularly knows as Ajmer. He was one of the great rulers who stood up bravely against the invasion of the Muslim Rulers.

Early in his career, Prithviraj achieved military success against several Hindu kingdoms, most of the famous is the victory against Paramadi king of Chandela. After that, he fought with the Muslim Ruler Muhammad of Ghor from the Ghurid dynasty. His Defeat at Tarain is seen as the main event in the Conquest of India by Islam.

Early Life Rai Pithora was born to King Someshvara and his Queen Karpura Devi in Chahamana. Both he and his brother Hariraja was born in Gujrat. According to an inscription Prithviraja Vijaya, Prithviraj was born on the 12th day of the Jyestha month, which is the se…