So we are using some rich snippets and they use the html5 markup scheme.
Our problem is the itemscope attribute doesn’t have a value.
<div itemscope itemtype="http://schema.org/LocalBusiness">
This cause our old products html validation to fail because it thinks it’s an empty tag. Does google and markup rules work the same if you assign it a value of 1 like so.
<div itemscope="1" itemtype="http://schema.org/LocalBusiness">
It’s a work around for now until we can properly update our validation methods but that is a farther out project.
So basically is there a proper syntax to make this still valid for Googles Rich Snippet rules, html5 and older validation engines prior to html5?
(This answer is basically copied from Peter Murray, specifically these two comments.)
The HTML5 spec allows for boolean attributes with a value of an empty string or the attribute name:
So either this:
or this:
is valid HTML5.
To be sure that Google recognizes
itemscope="itemscope"correctly, he (Peter Murray) created an example page and ran it through Google’s rich snippet validator. From the results, you can see that Google picked up the data (an Event item) correctly.