another google markup query

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

another google markup query

Post 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.
User avatar
Albert Wiersch
Site Admin
Posts: 3785
Joined: Sat Dec 11, 2004 9:23 am
Location: Near Dallas, TX
Contact:

Re: another google markup query

Post 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-*)
Albert Wiersch, CSS HTML Validator Developer • Download CSS HTML Validator FREE Trial
Post Reply