Hi, Today we talk about Adsense ad code and why we convert it to XHTML. You can convert ad code yourself. It is a simple, safe and easy method to encode HTML and JavaScript advertisement codes into strict XHTML entities. If you directly use ad codes in blogger template, it will not display ads on your blog. So it’s necessary for us to convert it in XHTML.
So here is the safest and easiest method to ad code convert into XHTML entities and after converting ad code, you can show your Adsense ad anywhere on the blogger template. You can use this ad code convert method to convert any kind of JavaScript ads codes, It can convert ad codes of Adsense, Chitika, Adbrite or any other HTML and JavaScript code. But first you should take a backup of your blogger template before making any changes.
Must Read: Google Keep is small but most useful App
Adsense code seems like this:
<script type=”text/javascript”><!–xxxxxxx_ad_client = “ca-pub-xxxxxxxxxxxxxxxx”;/* ad1 */google_ad_slot = “xxxxxxxxxxx”;google_ad_width = 300;google_ad_height = 250;//–></script><script type=”text/javascript”src=”http://xxxxxxxxxxxxxxx/xxxxxxxxxxxxxx/show_ads.js”></script>
But this code is not working in a web or HTML template. So we required to convert this ad code in XHTML. It is very easy and simple and we don’t need any online site to convert this code. have a look how to convert ad code.
This code have lots of symbol like <, “, > etc. XHTML require to change it. So let’s go….
< = <
> = >
” = "
‘ = '
& = &
After change code look like this:
<script type="text/javascript"><!–xxxxxxx_ad_client = "ca-pub-xxxxxxxxxxxxxxxx";/* ad1 */google_ad_slot = "xxxxxxxxxxx";google_ad_width = 300;google_ad_height = 250;//–></script><script type="text/javascript"src="http://xxxxxxxxxxxxxxx/xxxxxxxxxxxxxx/show_ads.js"></script>
Note: – This method doesn’t break AdSense program policies because you are not modifying the ad code in any way. you can just convert your ad code into XHTML.
MEHUL PATEL
hello how to add INDEX OF POST widget in Blogger.
Please send me code of this widget.
Abhishek Sharma Post author
why are you copy me ? try to same thing new yar