Error while adding Adsense Ad code in the Blogger Theme

How to Solve Error while adding Adsense Ad code in the Blogger Theme to put the Ad in the middle of the Blog Post


I tried to put the Google adsense ad code in side of my blogger theme or template to display ads in the middle of my blog posts but suddenly i got the error.Then i started to solve the problem of error but i tired to solve the exact solution but what can i do .Searched for the correct trick .But finally ,i found the below technique to rectify the error.

So that here i shared the information regarding error while adding Adsense Ad code in the Blogger Theme to place java script ad code inside the template or theme.

First login to your Google Adsense account and generate an ad. Copy the asynchronous code. It looks like this;

<script async  src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js</span>"></script>
<!-- 336 x 280 Responsive QRS -->
<ins class="adsbygoogle"
 style="display:block"
 data-ad-client="ca-pub-731939xxxxxxxx"
 data-ad-slot="15265xxxxxx"
 data-ad-format="auto"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
Find the position you want to add the adsense code to on your Blogger template.


Error is Attribute name "async" associated with an element type "script" must be followed by the ' = ' character

We will receive a warning that “Attribute name “async” associated with an element type “script” must be followed by the ‘ = ‘ character.”

Edit the asynchronous code and add the “async” attribute to it like this;

<script async="async" src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js</span>"></script>
<!-- 336 x 280 Responsive QRS -->
<ins class="adsbygoogle"
 style="display:block"
 data-ad-client="ca-pub-731939xxxxxxxx"
 data-ad-slot="15265xxxxxx"
 data-ad-format="auto"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
Note the =”async” attribute in line 01 in the asynchronous adsense code.

Then save your Blogger template and there won’t be any errors any more.


Comments

Most Useful Articles

How to Make Blogger BlogSpot Layout As Responsive Template

How to Show Blogger Widgets in Mobile View with Simple Steps

How to Create Internal Links within The Post in Blogger

How to Display Blogger Posts in Grid View with Thumbnails

How to Get Back A Hacked Facebook Account and Secure within 10 Steps

Blogger Login Google Account: How to Create a New Google Account(Gmail)