Ads
Customize Your Ads
The best ads can improve user experience. While the actual ad content comes from advertisers, you have control over the content type, color, size, and placement of those ads.
The best ads can improve user experience. While the actual ad content comes from advertisers, you have control over the content type, color, size, and placement of those ads.
TL;DR
When it comes to deciding where to place ads on your site, and how many ads to include, always put the user first!
Sample placement options for mobile ads:
For more information, review the AdSense best practices for ads placement .
In some cases, you may need more control over the way your ads are displayed than simply using responsive ads. In this case, you can switch to advanced mode and override smart sizing in your responsive ad unit code. For example, you can control the exact sizing of ads using media queries :
<style type="text/css">
.adslot_1 { width: 320px; height: 50px; }
@media (min-width:500px) { .adslot_1 { width: 468px; height: 60px; } }
@media (min-width:800px) { .adslot_1 { width: 728px; height: 90px; } }
</style>
<ins class="adsbygoogle adslot_1"
style="display:block;"
data-ad-client="ca-pub-1234"
data-ad-slot="5678"></ins>
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script>(adsbygoogle = window.adsbygoogle || []).push({});</script>
See advanced features in the AdSense help for more information.
Important
The most successful ads blend or contrast your site’s styles. Google AdSense provides a set of predefined ad styles ; choose the style that best fits your site or create your own.
You can customize any of the following styles in text ads:
When creating a new unit, you can apply a different style to text ads by expanding the Text ad style property:
All text ads use the Google AdSense Default style. You can use any of the predefined style as is, make slight changes to the style, or create, your own custom style.
Once you’ve saved a new style, you can apply it to any of your existing or new ad units:
When you change an existing ad style, any active ad units using that style are automatically updated.
Note
Updated on 2014-08-12
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 3.0 License , and code samples are licensed under the Apache 2.0 License . For details, see our Site Policies .