Syntax Highlighter are generally used for blogs, which mainly focus on scripting tutorials. We could have seen in many popular blogs using script highlighter to highlight the script. It not only highlight the script, but also give us a clear idea, how the script was formulated. This javascript can be capable of displaying css, xml, jscript, python, c# and much more supported programing languages. Most of the blogs are using the older version of Syntax Highlighter created by Alexgorbatchev. So here I am going to teach you, how to install syntax highlighter 2.1 (latest version) on your blogger / blogspot blogs. Before you could get in to the process, I recommend you to back up your template.
Step 1:
I made the installation steps more simple to help people implement it without any mess. Navigate to Blogger dashboard > Layout > Edit HTML and Expand Widget Templates. Search for
Step 2: Whenever you publish a post with script, include the script within the < pre > section
<pre class=”brush: js”>
Your script here
</pre>
Step 1:
I made the installation steps more simple to help people implement it without any mess. Navigate to Blogger dashboard > Layout > Edit HTML and Expand Widget Templates. Search for
and replace it with the below code<head>
Step 2: Whenever you publish a post with script, include the script within the < pre > section
<pre class=”brush: js”>
Your script here
</pre>