Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

Here is the example:

<div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
    <p>some text and lorem ipsum</p>
    <div class="random">
       <span itemprop="price">$40</span>
    </div>
</div>
share|improve this question
    
Looking at the documentation I can't work this out. However in the example for itemprop - schema.org/docs/gs.html#microdata_itemprop they use a span where you have <div class="random">. Could you use a span? You could always give it a go and test with google.com/webmasters/tools/richsnippets –  paulmorriss Jul 20 '11 at 14:23
    
so you are aware, I don't think the rich snippets testing tool works with schema.org standard at the moment. –  Matthew Brookes Aug 9 '11 at 21:30

1 Answer 1

Yes, you can use the itemprop attribute within an HTML tag even if the immediate enclosing HTML tag brackets, such as <div> and </div>, does not have itemscope and itemtype, as long as some level of enclosing tag brackets does define the item scope and type. The microdata attributes can be used in any type of HTML tags, not just <div> and <span>, and many intervening HTML tags and nesting levels may occur. The itemprop is deemed to apply to the nearest enclosing itemscope.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.