Mobile app version of vmapp.org
Login or Join
Carla537

: Why use meta for some Schema markup? I don't quite understand why some Schema.org examples use <meta> instead of say <span>. For example: <meta itemprop="startDate" content="2016-04-21T20:00">

@Carla537

Posted in: #Html #MetaTags #SchemaOrg

I don't quite understand why some Schema.org examples use <meta> instead of say <span>. For example:

<meta itemprop="startDate" content="2016-04-21T20:00">
Thu, 04/21/16
8:00 p.m.


Source: schema.org/Event
If my current markup is:

<li>Jan 13-15, 2016</li>


Do I need to use meta or can I just add the Schema itemprop and content stuff inside the <li>? And what's the reason so I know when I will need to use the <meta>?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Carla537

1 Comments

Sorted by latest first Latest Oldest Best

 

@Shanna517

For Microdata, meta and link elements should be used if you don’t want to display the value of the property on your page.

This is typically the case for properties that expect a value that is not human-readable, for example URIs that represent accepted payment/delivery methods (= good case for link), or ISO 4217 codes that represent currencies (= good case for meta).



The example with the startDate property would ideally use the time element instead, as this is what should be used for dates/times, and it allows to specify the machine-readable format in the datetime attribute:

<time itemprop="startDate" datetime="2016-04-21T20:00">
Thu, 04/21/16
8:00 p.m.
</time>


For your own example, you could also use time elements, but because of your chosen format, it might not be very elegant:

<li>
Jan <time itemprop="startDate" datetime="2016-01-13">13</time>-<time itemprop="endDate" datetime="2016-01-15">15</time>, 2016
</li>


The alternative with meta elements could look like:

<li>
Jan 13-15, 2016
<meta itemprop="startDate" content="2016-01-13" />
<meta itemprop="endDate" content="2016-01-15" />
</li>


Which one of those to use is a semantic markup question; it doesn’t affect the extracted Microdata/Schema.org.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme