Page 1 of 1

another google markup query

Posted: Sun Apr 20, 2014 8:57 am
by roedygr
Google adsense asks you to put code like this on your webpage to display an ad.

<ins class="adsbygoogle"
style="display:inline-block;width:728px;height:90px"
data-ad-client="ca-pub-7275336356867641"
data-ad-slot="5284935692"></ins>


HTMLValidator thinks it is fine. However, I find it hard to believe that data-ad-client and data-ad-slot could be kosher HTML5 properties.

Re: another google markup query

Posted: Sun Apr 20, 2014 9:31 am
by Albert Wiersch
Hi Roedy,

Actually, data-* attributes are valid HTML5 attributes. They are used for custom data, which is why CSE HTML Validator doesn't complain.

Please see:
Using data-* attributes
HTML5 Custom Data Attributes (data-*)