Can Schema.org Expected Types be collections, too?

Every Schema.org property can have multiple values. It doesn’t necessarily make sense for some properties (e.g., birthDate), but it’s still allowed. In JSON-LD: “sameAs”: [“https://stackoverflow.com/foo”, “/bar”], In Microdata: <link itemprop=”sameAs” href=”https://stackoverflow.com/foo” /> <link itemprop=”sameAs” href=”http://stackoverflow.com/bar” /> In RDFa: <link property=”sameAs” href=”https://stackoverflow.com/foo” /> <link property=”sameAs” href=”http://stackoverflow.com/bar” /> This doesn’t necessarily mean that Google (or any other … Read more

Why does Google Testing Tool use the “id” attribute to generate a URL for the Microdata item?

This is strange. It’s definitely not conforming to the Microdata Note. Apart from Microdata’s itemref attribute, HTML5’s id attribute has no special meaning in Microdata. If Google wants to use the id value anyway, they should at least generate the URL with a fragment identifier, i.e., http://www.example.com/#foobar. My guess is that they are (probably unintentionally) … Read more

How to implement “mainEntityOfPage” to this specific site?

About Google’s Microdata example Google’s Microdata example is invalid. If the meta element has the itemprop attribute, the content attribute is required (details). I described different ways how to specify mainEntityOfPage in Microdata, the most straigtforward one being a link element that creates a URL value (instead of another Microdata item): <link itemprop=”mainEntityOfPage” href=”http://example.com/article-1″ /> … Read more

Schema.org – JSON-LD – Where to Place?

The data can be placed anywhere. From Google’s documentation: The data, enclosed within the <script type=”application/ld+json”> … </script> tags as shown in the examples below, may be placed in either the <HEAD> or <BODY> region of the page that displays that event. You can also use data dynamically fetched using AJAX: JSON-LD markup inserted by … Read more

Schema.org JSON-LD reference

You can identify a node by giving it a URI, specified in the @id keyword. This URI can be used to reference that node. See the section “Node Identifiers” in the JSON-LD spec. So your main event could get the URI http://example.com/2016-04-21#main-event: <script type=”application/ld+json”> { “@id”: “http://example.com/2016-04-21#main-event”, “@context”: “http://schema.org”, “@type”: “Event”, “name”: “MainEvent”, “startDate”: “2016-04-21T12:00” … Read more