Can I use multiple itemtypes in the same object for Schema.org?

I am wondering if I can use several types of elements within the same area. For example, I have this at the moment:

<body id="home" itemscope itemtype="http://schema.org/WebPage"> <div class="wrapper" itemscope itemtype="http://schema.org/ProfessionalService"> <p itemprop from professional service></p> <p itemprop from web page></p> </div> </body> 

When I perform a structured data test in the tools of the Google Web developer, it only receives items within the professional services scheme, and each itemprop element associated with the web page scheme is ignored and not recognized as part of the professional service. I understand how to wet them and why this happens.

Can I have multiple itemtype elements within an area? For example:

 <div class="wrapper" itemscope itemtype="http://schema.org/ProfessionalService http://schema.org/WebPage"> <p itemprop from professional service></p> <p itemprop from web page></p> </div> 
+8
microdata
source share
1 answer

Yes, you can use several types of items in the same itemtype attribute if they are from the same dictionary. See Microdata: itemtype :

The itemtype attribute, if specified, must have a value that is an unordered set of unique space-separated case-sensitive tokens, each of which is a valid URL, which is an absolute URL, and all of which are defined to use the same dictionary .

But note that then all properties ( itemprop values) must be defined for all specified types of elements. Therefore, you cannot say that a particular property should belong only to a particular type of element.

So youd still have the same problem. In your case, you must either use the correct nesting or use the itemref attribute to add properties to the corresponding elements that are scattered on the page.


FWIW, the schema.org dictionary also defines the additionalType property. It can also be used to indicate additional types of items from other dictionaries. But this does not allow the use of properties from an additional element type.

+4
source share

All Articles