Guidelines for adding the AdSense code to your web page
Adding the AdSense code to your web page is a very straightforward process. You just need to copy the AdSense code from your AdSense account (as seen in the AdSense code box) and paste it into your HTML code. However, there are certain guidelines that you need to follow when pasting the AdSense code on your web page.
Firstly, you should never tamper with the AdSense code in any way. It should be pasted as such, in its entirety, without any changes or modifications; otherwise, your AdSense code will not work. Moreover, you might end up violating the AdSense program policies.
Further, you must ensure that you use a maximum of three ad units per web page (this is the limit specified by the Google AdSense program) and not more than 1 link unit per web page.
Since content-based Ad targeting is the main concept behind the AdSense program, you need to ensure that you paste your AdSense code in the place where you have your main content pieces e.g. if you have your main content in a particular frame or a ‘DIV’ tag, your AdSense code should be pasted in that particular frame or ‘DIV’ tag.
Be careful when using WYSIWYG editor (What you see is what you get) editors. Such editors sometimes add few tags on their own. So, paste the AdSense code only in source code directly and not in the preview page or any other view of your web page. Always check the AdSense code for additional irrelevant tags before you upload your web page to your server.