hello I have a page ( http://schema.org/WebPage ) that contains a review ( http://schema.org/Review )
the question are:
example:
<html itemscope itemtype="http://schema.org/WebPage">
<meta name="description" content="_________" itemprop="description">
...
<div itemscope itemtype="http://schema.org/Review">
<div itemprop="description">_________</div>
</div>
...
</html>
the description belongs to the Review AND to the WebPage, so... what I should write in this case?
(note: in the previous example the string "__" is the same text paragraph, repeated twice)
EDIT:
can this be a solution? (the html5 spec doesn't talk about this, but defines the itemref attribute)
<html itemscope itemtype="http://schema.org/WebPage" id="WEBPAGE">
...
<div itemscope itemtype="http://schema.org/Review" id="REVIEW">
<div itemprop="description" itemref="WEBPAGE REVIEW">_________</div>
</div>
...
</html>
FEEL FREE TO IMPROVE THE QUESTION!
Schema markup, found at Schema.org, is a form of microdata. Once added to a webpage, schema markup creates an enhanced description (commonly known as a rich snippet), which appears in search results.
Microdata is a form of structured data which is used to insert metadata within existing webpage content. In a nutshell, microdata allows you to provide labels for individual content elements using 'name:value' pairs.
What is How-To Schema? For those wondering what is Schema, it's a way of marking up content for Google and other search engines to make it easier for them to parse out things like supplies, instructions, photos, etc.
For example, Yandex, a major search engine in Russia, supports microformats such as hCard (company contact information), hRecipe (food recipe), hReview (market reviews) and hProduct (product data) and provides its own format for the definition of the terms and encyclopedic articles.
Include by wrapping
When you use the itemref attribute you include all property contained within the referred element to a different scope.
<body itemscope itemtype="http://schema.org/WebPage" itemref="wrapper">
...
<div itemscope itemtype="http://schema.org/Review">
...
<div id="wrapper">
<div itemprop="description">_________</div>
<div itemprop="some-other-property">_________</div>
</div>
...
</div>
...
</body>
Include by wrapping - a different example
Lets say you have a product with a few different offers outside the scope.
<div itemscope itemtype="http://schema.org/Product" itemref="wrapper">
...
</div>
<div id="wrapper">
<div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
...
</div>
<div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
...
</div>
<div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
...
</div>
</div>
Include a specific property
You might only wish to include one specific property outside the scope, to do this we can simply set the id directly on the targeted element with the itemprop specified.
<body itemscope itemtype="http://schema.org/WebPage" itemref="target">
...
<div itemscope itemtype="http://schema.org/Review">
<div id="target" itemprop="description">_________</div>
</div>
...
</body>
Multiple references
Maybe a wrapper isn't applicable, then you can use multiple references. You separate them simply by space.
<body itemscope itemtype="http://schema.org/WebPage" itemref="desc name">
...
<div itemscope itemtype="http://schema.org/Review">
<div id="desc" itemprop="description">_________</div>
<div id="name" itemprop="name">_________</div>
</div>
...
</body>
See also thees pages for some other explanations and examples:
http://www.w3.org/TR/2011/WD-microdata-20110405/
http://www.whatwg.org/specs/web-apps/current-work/multipage/microdata.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With