Google's New AdSense Code Might Invalidate Your HTML Code

Jan 20, 2009 • 8:34 am | comments (1) by twitter Google+ | Filed Under Google AdSense

A WebmasterWorld thread has a lot of discussion around the AdSense code not complying with the W3C validation requirements. Some webmasters want their pages to be 100% validate, and adding this code may ruin that.

I am told the piece that invalidates the HTML is:


There is no word from a Google representative on this issue, yet. But I suspect we should hear soon about this. I mean, the thread is pretty active and it should be an easy fix for Google, I would suspect.

Forum discussion at WebmasterWorld.

Previous story: Getting Hacked May Also Hurts Your Google AdWords Campaign


David Hammond

01/23/2009 03:51 pm

That piece of HTML alone isn't invalid. The problem is that id values must be unique within the page, so you can't have more than one element with the same id value. If you use two AdSense boxes as Google allows, that will make two elements with an id value of "cse-search-box", which isn't allowed.

blog comments powered by Disqus