Mobile app version of vmapp.org
Login or Join
Karen161

: Why is this Schema.org microdata markup wrong? I have a page listing multiple events in a table, so I have each one set as its own Event in microdata markup, as below: <div itemscope itemtype="https://schema.org/Event"&

@Karen161

Posted in: #Microdata #SchemaOrg

I have a page listing multiple events in a table, so I have each one set as its own Event in microdata markup, as below:

<div itemscope itemtype="https://schema.org/Event">
<tr>
<meta itemprop="name" content="Really Cool Event">
<td itemprop="location" itemscope itemtype="https://schema.org/Place">
<a href="#"><span itemprop="name">Hooville</span></a>
<div itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
<meta itemprop="addressLocality" content="Hootown, USA">
</div>
</td>
<td><span itemprop="startDate" content="2015-12-25">25th</span> - <span itemprop="endDate" content="2015-12-30">30th December 2015</span></td>
<td itemprop="offers" itemscope itemtype="https://schema.org/Offer" id="price" class="text-success">
<span itemprop="price" content="1000"><strong>00</strong></span>
</td>
</tr>
</div>


However, Google's Structured Data Tester fails to find the location, startDate and offer for the Event. It finds the Place just fine, but separates it from the Event. It seems to me that they are all nested within the Event div, so what's up?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Karen161

2 Comments

Sorted by latest first Latest Oldest Best

 

@Heady270

To be validated it should look like:

<div itemscope itemtype="https://schema.org/Event">
<div>
<meta itemprop="name" content="your event's name" >
<link itemprop="url" href="http://www.example.com/your-events-website.html">
<meta itemprop="name" content="Really Cool Event">
<div itemprop="location" itemscope itemtype="https://schema.org/Place">
<a href="#"><span itemprop="name">Hooville</span></a>
<div itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
<meta itemprop="addressLocality" content="Hootown, USA">
</div>
</div>
<div><span itemprop="startDate" content="2015-12-25">25th</span> - <span itemprop="endDate" content="2015-12-30">30th December 2015</span></div>
<div itemprop="offers" itemscope itemtype="https://schema.org/Offer" id="price" class="text-success">
<meta itemprop="name" content="your offer's name" >
<link itemprop="url" href="http://www.example.com/your-offers-website.html">
<span itemprop="price" content="1000"><strong>00</strong></span>
</div>
</div>
</div>

10% popularity Vote Up Vote Down


 

@Ogunnowo487

Your table markup is not valid (a div can’t contain a tr, a tr can’t contain a meta).

If you fix it, Google’s testing tool seems to recognize it fine.

A quick way for testing this (but you shouldn’t publish like that): replace the tr and td elements with div.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme