1

Is it obligatory to write Product node (parent) before Offer node (child) in DOM schema of schema.org or I can define Offer node without its parent node?

unor
  • 92,415
  • 26
  • 211
  • 360
mdromed
  • 49
  • 7

1 Answers1

2

Schema.org never requires the existence of "parent" items (unless you use itemprop on an element with itemscope).

So this is totally fine:

<html itemscope itemtype="http://schema.org/Offer">
</html>

But even if you would want to add a Product, it doesn’t have to be a parent for Offer.

You can nest the Product under Offer:

<div itemscope itemtype="http://schema.org/Offer">
  <div itemprop="itemOffered" itemscope itemtype="http://schema.org/Product"></div>
</div>

Or you can have both on the same level and use itemref:

<div itemscope itemtype="http://schema.org/Offer" itemref="foo">
</div>

<div itemprop="itemOffered" itemscope itemtype="http://schema.org/Product" id="foo">
</div>
Community
  • 1
  • 1
unor
  • 92,415
  • 26
  • 211
  • 360