Welcome to WebmasterWorld Guest from

Forum Moderators: incrediBILL & martinibuster

Message Too Old, No Replies

Adsense Code Should Be Inside of a Div?



5:34 pm on Nov 20, 2006 (gmt 0)

5+ Year Member

Should the adsense code be placed inside a div? Or, is it alright to just post it into the page as-is?




5:40 pm on Nov 20, 2006 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member

The Adsense code can be placed in your HTML code as-is. Any styling that needs to be done to the actual ad can be done through the Adsense Setup interface.


3:33 am on Nov 21, 2006 (gmt 0)

5+ Year Member

Lots of people choose to put ads on their site by first having a div as a placeholder in the normal span of the page, and then having another div later containing the AdSense code positioned where the original div was. The thinking there is to make sure the content comes up as easily as possible when a search engine reads the page and not get tangled up in extra details.


<div id = "main_ad_container"></div>
blah blah
<div id = "main_ad_content">
<!-- adsense code -->

Imagine though that "blah blah" has a lot more to it and again, div "main_ad_content"> is positioned through css to appear where the original div is/was. I'm not sure if this method improves rankings or whatnot though.


4:44 am on Nov 21, 2006 (gmt 0)

5+ Year Member

you can put that code in any tag..

no worry about it...

just worry about ... you can not change that code manually...
anything else you can do with adsense code


3:55 pm on Nov 21, 2006 (gmt 0)

WebmasterWorld Senior Member ann is a WebmasterWorld Top Contributor of All Time 10+ Year Member

Putting your most important ad code in a div will encourage the placement of the higher paying ads to it since it gives more importance to that ad block as being first even though it may be at the bottom of the page.



Featured Threads

Hot Threads This Week

Hot Threads This Month