how to highlight code in blogger

Sometimes we write posts about coding so we display the code in our blog post. So that our visitor can easily copy that code. We easily highlight code in posts by using the Syntax highlighter plugin in our WordPress blog. But what should he do if his blog is on Blogger ?? There are many ways for that too. I am going to tell you about syntax highlighter for blogger in this post. With which you will be able to share your visitors by highlighting the code in your Blogger blog as well.

You must have seen in many blogs that the code appears in the post there. Through which we can easily copy that code and add it to our blog. How to highlight code in WordPress? Almost everyone will know about this that, with the Crayon Syntax Highlighter plugin, we can highlight the code in the post. But whose blog is in Blogger, how to highlight the code in the post? Very few people know about it. That is why in this tutorial, how do you add code highlighter to Blogger? I'm gonna tell about it.

Recently, a friend asked me a question "When I put the code in my blog post, it does not show, but starts working." What should I do? That is why today I'm explaining to you how to highlight the code in a blog post and at the same time when to add code to a blog post, why does it work instead of being shown?

Any website needs coding in developing and, coding is also used to design any site. PHP, HTML like coding languages ​​are used for website development and design. There are many people who do not have knowledge of coding, they design the website by searching on the internet. If he has good knowledge of coding he builds his site on this topic and he shares posts about website development and design. In such a topic, we often have to share the coding in the post as well. So that with the help of that coding our visitor can design and develop his website.

In my case, when I created my blog on WordPress for the first time, I know nothing about the plugin and at that time I used to think that all the plugins on WordPress are activated, we just have to use those plugins. later I came to know that the plugin has to be activated by installing. For me, the biggest problem at starting was that I didn't know how to show the code in the post! I came to know about it later but for this, I faced many problems. This often happens with new bloggers. That is why I thought it would be necessary to write a post about it.

If you are a WordPress user, then I tell you that you can use the Crayon Syntax Highlight Plugin to highlight the code. Apart from this, if you want, you can also use the Syntax Highlighter Evolved plugin and you can host the code by creating your account in GitHub's site. If you are a Blogger user, then we are going to tell you about this below.

How to Add Syntax Code Highlighter to Blogger Blog.

Just like with the Syntax Highlighter plugin in WordPress, we make the code highlight or show in the post, similarly, if your blog is in Blogger, then you have to add the script of Syntax Highlighter for blogger. We are telling you about this below. Let's know this step by step how to add Syntax Highlighter to Blogger blog.

Step 1: First of all go to Syntax Script Generator Tool.

1. Select the theme here, which will show in the code highlight. I think select Default only.
2. Mark ​​which language code you want to show in the post. Like in my blog mostly I use PHP, HTML, CSS, Javascript, then I have ticked the Action script to show HTML. Similarly, tick the coding you want to show in your post.
3. Now click on the Generate Code button.
4. Now your code has been generated. Copy the code of this box and save it in Notepad.

Step 2: Now login to Blogger and go to Dashboard -> Themes -> Edit HTML and find them by pressing CTRL + F button. After that, add the code you generated from the tool mentioned above or before and save the template.

Now Syntax Highlighter has been added to your blog. It is very important for you to know how to Show or Highlight the code in the post. So let us know about this below also.

How to make Code Highlight or Show in post.

You must have added Syntax Highlighter to your blog following the procedure mentioned above. Now we are telling you what to do to highlight the code in the post. Before that, we give you the address below

What tag to use in which code language?

CSS -

HTML -

 

JavaScript -

The code

you are using will have to use the tag. So now we know step by step below how to add code to the post.

Step 1: In your blog, open the post in the editor you want to show the code.

1. Now click on the Compose tab.
2. Enter the code where you want to show the code.

Note: We first asked you to put the code in the compose tab because it will automatically encode your code. If you put the code in the HTML tab without encoding it will not show.

Step 2:

1. Now click on the HTML tab. After this automatic, your code will be encoded.
2. Now your code will be encoded, it will not look like before. on location & gt; Will happen. Something similar will happen. In order to show the code in Post, the code in HTML mode has to be encoded and added. Now before your code,

it has to be used in the last of the code. As in the screenshot below.

That’s it.

In this way, you can show by highlighting the code in your blog post. I hope that you have understood the process mentioned above. If there is any problem then leave a comment. When you write the code in your post, it will become an automatic highlight. That is, its color and style will be changed.

If you are a WordPress user then you can use Crayon Syntax Plugin. This plugin is very good and easily highlights the code.

I hope that with the help of this post, I have added syntax highlighter to my blog. If you have any questions related to this post leave a comment.

Do share this post on social media.