another google markup query

For technical support for all editions of CSS HTML Validator. Includes bug reports.
Post Reply
User avatar
roedygr
Rank V - Professional
Rank V - Professional
Posts: 370
Joined: Fri Feb 17, 2006 5:22 am
Location: Victoria BC Canada
Contact:

another google markup query

Post by roedygr » Sun Apr 20, 2014 8:57 am

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.

User avatar
Albert Wiersch
Site Admin
Site Admin
Posts: 3412
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: another google markup query

Post by Albert Wiersch » Sun Apr 20, 2014 9:31 am

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-*)
Image
Albert Wiersch

Post Reply