Results 1 to 9 of 9

Thread: Make AdSense For Search Code W3C Compliant

  1. #1
    Will.Spencer's Avatar
    Will.Spencer is offline Retired
    Join Date
    Dec 2008
    Posts
    5,033
    Blog Entries
    1
    Thanks
    1,010
    Thanked 2,327 Times in 1,258 Posts

    Make AdSense For Search Code W3C Compliant

    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 adsense-support@google.com 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:

    Code:
    <img src=" http://www.google.com/logos/Logo_25wht.gif" 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:

    Code:
    <img src=" http://www.google.com/logos/Logo_25wht.gif" 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.

    ...

    Sincerely,

    Geoffrey
    The Google AdSense Team
    Submit Your Webmaster Related Sites to the NB Directory
    I swear, by my life and my love of it, that I will never live for the sake of another man, nor ask another man to live for mine.

  2. Thanked by:

    britishguy (28 January, 2009), Charles (28 January, 2009), LogicFlux (28 January, 2009)

  3. #2
    britishguy's Avatar
    britishguy is offline Newbie Net Builder
    Join Date
    Jan 2009
    Posts
    127
    Thanks
    21
    Thanked 42 Times in 28 Posts
    Thanks for the 'heads up' and delighted to see something positive coming back from G

  4. #3
    elbandelero's Avatar
    elbandelero is offline Net Builder
    Join Date
    Dec 2008
    Location
    Spain
    Posts
    544
    Thanks
    209
    Thanked 105 Times in 79 Posts
    Yeah that is good news, but I still refuse to put their search box on my sites because they only offer three color variations and the background color is always solid white or gray.

    I'd love to add the search box to the top right of my aprender inglés site but unless I can make the background transparent it just doesn't look right with a solid color.

  5. #4
    Charles's Avatar
    Charles is offline Senior Net Builder
    Join Date
    Dec 2008
    Location
    On the Bike
    Posts
    1,211
    Blog Entries
    5
    Thanks
    311
    Thanked 311 Times in 212 Posts
    Quote Originally Posted by elbandelero View Post
    I'd love to add the search box to the top right of my aprender inglés site but unless I can make the background transparent it just doesn't look right with a solid color.
    Last time that happened to me... I added the search engine below my content, which also allowed me to stuff the keyword a little more.

    <h2>Search <i>Keyword Here</i></h2>

  6. Thanked by:

    elbandelero (28 January, 2009), Will.Spencer (28 January, 2009)

  7. #5
    elbandelero's Avatar
    elbandelero is offline Net Builder
    Join Date
    Dec 2008
    Location
    Spain
    Posts
    544
    Thanks
    209
    Thanked 105 Times in 79 Posts
    I never even considered adding the searchbox below the content, did that work for you revenue wise?

  8. #6
    Charles's Avatar
    Charles is offline Senior Net Builder
    Join Date
    Dec 2008
    Location
    On the Bike
    Posts
    1,211
    Blog Entries
    5
    Thanks
    311
    Thanked 311 Times in 212 Posts
    Quote Originally Posted by elbandelero View Post
    I never even considered adding the searchbox below the content, did that work for you revenue wise?
    The project was not large enough to be considered scalable. The main reason why I would still consider doing so, is for the opportunity to stuff my keyword a little more.

  9. #7
    elbandelero's Avatar
    elbandelero is offline Net Builder
    Join Date
    Dec 2008
    Location
    Spain
    Posts
    544
    Thanks
    209
    Thanked 105 Times in 79 Posts
    Quote Originally Posted by Charles View Post
    The project was not large enough to be considered scalable. The main reason why I would still consider doing so, is for the opportunity to stuff my keyword a little more.
    That is an excellent point. Would it be advisable to add a short paragraph before or after the search box so that the <h2> isn't seen as manipulating the user into using the search box.

  10. #8
    Charles's Avatar
    Charles is offline Senior Net Builder
    Join Date
    Dec 2008
    Location
    On the Bike
    Posts
    1,211
    Blog Entries
    5
    Thanks
    311
    Thanked 311 Times in 212 Posts
    Quote Originally Posted by elbandelero View Post
    Would it be advisable to add a short paragraph before or after the search box so that the <h2> isn't seen as manipulating the user into using the search box.
    That could be an idea -- but I don't overly see how it is any different to saying "Sponsors" above an advertisement block. Might need that one checked by adsense-support.

  11. #9
    Come's Avatar
    Come is offline Building a Twitter Empire
    Join Date
    Dec 2008
    Location
    Martinique, FWI
    Posts
    321
    Blog Entries
    6
    Thanks
    27
    Thanked 43 Times in 36 Posts
    It seems you ahve good contacts with them
    Thanks!

Similar Threads

  1. is it allowed to put adsense code on pop up?
    By garfish in forum AdSense
    Replies: 3
    Last Post: 3 November, 2012, 09:27 AM
  2. [WTS] [$20] $100 Google AdSense Code
    By Ace in forum Advertising
    Replies: 0
    Last Post: 24 March, 2011, 19:02 PM
  3. Familiar name in The Adsense Code
    By DotComBum in forum General Chat
    Replies: 2
    Last Post: 2 January, 2010, 01:18 AM
  4. how to make coupon code redirect
    By MeetHere in forum Programming
    Replies: 13
    Last Post: 26 December, 2009, 23:11 PM
  5. Replies: 4
    Last Post: 1 March, 2009, 12:24 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •