How To Correctly Add Together Javascript Codes Inward Blogger?

While adding JavaScripts codes inwards Blogger template editor, nosotros oftentimes confront merely about weird XML Errors similar Error parsing XML, describe of piece of job 768, column 20: The content of elements must consist of well-formed grapheme information or markup. These sorts of errors plough over off when a JavaScript code is non good formed, or the codes are non written correctly past times the developer.  Recently, 1 of our users asked us How to Correctly Add JavaScript Codes inwards Blogger?  This tutorial volition plough out to live on useful for those who are merely starting to larn Blogger template together with plugin development. In this article, nosotros volition demonstrate you lot How to Correctly Add JavaScript codes inwards Blogger?


The Blunder :

Before installing whatever novel codes inwards his template a individual should brand certain that the script or mode tags are properly closed. Most of the times you lot forget to re-create the ending script tag, together with inwards the halt ultimately it shows errors.  For those who don’t know a lot they utilisation codes similar this:

<script>
jQuery(document).ready(function($) {
---------------------------
---------------------------
---------------------------
});

Here, it tin dismiss clearly live on seen that the <script> tag is non followed past times a proper closing </script> tag which is wrong. The right technique is to closed the tags properly, similar nosotros create inwards elementary HTML.  Let's become ahead together with await at the right way of doing it.

How to Correctly Add JavaScript codes inwards Blogger?

Adding Scripts inwards Blogger is extremely straightforward. All you lot demand to create is to become to Blogger.com >> Your site >> Template >> Edit HTML. Now it depends on you lot where you lot would similar to glue your JavaScript coding. However, nosotros prefer you lot to add together it higher upwards the </head> tag because this is the house where all technical things are present. Here’s how the code would await like:

<script type='text/javascript'>
//<![CDATA[
Your JavaScript coding here
//]]>
</script>

Once the script is correctly added inwards your template hitting the “Save Template” button, together with this you lot would non confront whatever errors. Which way that the JavaScript is correctly added inwards your blogger template.

We promise this tutorial has helped you lot inwards learning how to properly add together javascript codes inwards blogger. Let us know nearly your experience? In illustration you lot bring faced such errors too. Feel gratuitous to travel out whatever mistake below that you lot are facing piece adding novel codes to your template. 

Comments