It is annoying that the Google AdSense for Search ad code is not W3C compliant, as it exists on almost every page that I publish.

A while back, I sent a note to about this issue and they actually responded with a useful and authorized fix.
Thanks for your email.

I'm happy to let you know that we do allow certain modifications to our AdSense for search code to comply with W3C HTML and XHTML standards. Here are the changes you'll need to make for your code to be compliant:

1. Remove the closing </input> and </image> tags 2. Add an additional closing '/' to the end of the opening html tags for <input> and <image>. This should occur for all 'image' and 'input' tags.

For example, this is an unmodified portion of the AdSense for search code:

<img src="" border="0"
alt="Google" align="middle"></img></a>
<input type="hidden" name="oe" value="ISO-8859-1"></input>

This is what the modified version would look like:

<img src="" border="0"
alt="Google" align="middle" /></a>
<input type="hidden" name="oe" value="ISO-8859-1" />

Please be sure to modify the search code only as described above, since our program policies don't permit any additional modifications. We appreciate your understanding.



The Google AdSense Team