Adsense Widget Sizing Options

Adsense Widget is using responsive CSS classes for sizing. If you have ever used bootstrap before, you will feel familiar with this. View demo placeholders using the link below:

View Sizing Demo

Here is a shortcode with most popular in-post sizing options:

[adsense userid="pub-xoxox" format="display" align="none" slot="xxx" sizes="sm-banner md-rectangle lg-leaderboard"]

This shortcode shows mobile banner on mobile phones, rectangle ads on medium and leaderboard ads on desktop. If you want to show rectangle on all sizes:

[adsense userid="pub-xoxox" format="display" align="none" slot="xxx" sizes="sm-rectangle md-rectangle lg-rectangle"]

How Does Adsense Sizing Work?

Sizing uses prefixes for different screen dimensions:

  • sm-: Mobile devices
  • md-: Tablets
  • lg-: Desktop & Laptops

Depending on device screen size, your ad size changes using the CSS width and height attributes.

Adsense Widget Sizing Options

MobileTabletDesktop
sm-rectangle336×280336×280336×280
md-rectangle336×280336×280336×280
lg-rectangle336×280336×280336×280
sm-banner320×100
md-banner468×60
lg-banner468×60
md-leaderboard728×90
lg-leaderboard728×90
lg-billboard970×250