I'm writing HTML/CSS/JS for about two years now and just decided to take more focus on to enhance my markup by using microdata/RDF.
Through further investigations and by looking up how this thing is already handled in the wild I came across YouTube and saw they're using meta tags within a div-block to describe their videos and found it to be weird since I never used meta tags beside within the head-section of a document.
The div-block had an itemtype to declare the scheme it's using so I checked the given page (schema.org) and found by digging in their docs the following part:
3c. Missing/implicit information: use the meta tag with content
Sometimes, a web page has information that would be valuable to mark up, but the information can't be marked up because of the way it appears on the page. [...]
In these cases, use the meta tag along with the content attribute to specify the information. Consider this example—the image shows users a 4 out of 5 star rating:
<div itemscope itemtype="http://schema.org/Offer">
<span itemprop="name">Blend-O-Matic</span>
<span itemprop="price">$19.95</span>
<img src="four-stars.jpg" />
Based on 25 user ratings
</div>
Here is the example again with the rating information marked up.
<div itemscope itemtype="http://schema.org/Offer">
<span itemprop="name">Blend-O-Matic</span>
<span itemprop="price">$19.95</span>
<div itemprop="reviews" itemscope itemtype="http://schema.org/AggregateRating">
<img src="four-stars.jpg" />
<meta itemprop="ratingValue" content="4" />
<meta itemprop="bestRating" content="5" />
Based on <span itemprop="ratingCount">25</span> user ratings
</div>
</div>
Source: http://schema.org/docs/gs.html#advanced_missing
Now it seems like best practise to (sometimes) add microdata that way but it still felt strange to me to use meta out of the head-block so I checked the w3 about meta tags and realized where that feeling came from.
4.2.5 The meta element
...
Contexts in which this element can be used:
- If the charset attribute is present, or if the element's http-equiv attribute is in the Encoding declaration state: in a head element.
- If the http-equiv attribute is present but not in the Encoding declaration state: in a head element.
- If the http-equiv attribute is present but not in the Encoding declaration state: in a noscript element that is a child of a head element.
- If the name attribute is present: where metadata content is expected.
...
Exactly one of the name, http-equiv, charset attributes must be specified.
If either name or http-equiv is specified, then the content attribute must also be specified. Otherwise, it must be omitted.
Source: http://www.w3.org/TR/html5/document-metadata.html#the-meta-element
Now I don't know what to think about that since the documentation given by schema.org practically ignores the w3 recommendation.
So I'm asking the more experienced guys for an answer to this before I actually start doing it wrong.
Greets JD.