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

Using schema.org branchOf with itemref

About itemref: it has to be specified on elements with itemscope it is used to reference other properties (= itemprop in Microdata) So this means for you: move itemref to the Hotel move itemprop=”branchOf” to the Organization Minimal example: <div itemprop=”branchOf” itemscope itemtype=”http://schema.org/Organization” id=”schema-organization”> <h1 itemprop=”name”>The Hotel Chain</h1> </div> <div itemscope itemtype=”http://schema.org/Hotel” itemref=”schema-organization”> <h2 itemprop=”name”>Hotel … Read more

Does Schema.org markup work if markup is dynamically built with JavaScript?

Google’s documentation only mentions that they can consume dynamically added structured data if the syntax JSON-LD is used: Also, Google can read JSON-LD data even when it is dynamically injected into the page’s contents, such as by Javascript code or embedded “widgets”. This does not necessarily mean that they can’t read it in case of … 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

JSON-LD Schema.org: Multiple video/image page

If you have multiple items as value of a property, you could use an array: <script type=”application/ld+json”> { “@context”: “http://schema.org”, “@type”: “WebPage”, “video”: [ { “@type”: “VideoObject” }, { “@type”: “VideoObject” } ] } </script> If you have multiple items on the top-level (not as value of a property), you could use a (named) graph … Read more