Mobile app version of vmapp.org
Login or Join
Gail5422790

: Meta-content or time-datetime How to show datePublished and dateModified Microdata? (I want to prioritize dateModified, this is why I do not show datePublished to the public) Option 1. If I understand

@Gail5422790

Posted in: #Dates #Html #MetaTags #Microdata #SchemaOrg

How to show datePublished and dateModified Microdata?
(I want to prioritize dateModified, this is why I do not show datePublished to the public)

Option 1. If I understand this is not correct. Div cannot have content, right?

<div itemprop="datePublished" content="2016-01-07"></div>
<div itemprop="dateModified" content="2016-08-17">Last Updated: 2016-01-07</div>


Option 2

<meta itemprop="datePublished" content="2016-01-07">
<meta itemprop="dateModified" content="2016-08-17"><div>Last updated: 2016-01-07</div>


Option 3

<time itemprop="datePublished" datetime="2016-01-07"></time>
<time itemprop="dateModified" datetime="2016-08-17">Last updated: 2016-01-07</time>


Question 1: Should I use meta, time, or both are correct?
Question 2: Should I separate "Last update" and put it in another div before meta or time?

<div>Last updated:</div>
<meta itemprop="dateModified" content="2016-08-17">
<div>2016-01-07</div>

<div>Last Updated: </div>
<time itemprop="dateModified" datetime="2016-08-17">2016-01-07</time>

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Gail5422790

1 Comments

Sorted by latest first Latest Oldest Best

 

@Sherry384

If you don’t want it to be visible, use meta.
If you want it to be visible, use time.

<meta itemprop="datePublished" content="2016-01-07">
Last updated: <time itemprop="dateModified" datetime="2016-08-17">2016-01-07</time>




The div elements don’t affect the Microdata (unless they have Microdata attributes themselves, of course).

Option 3: While it’s technically possible to use an empty time element instead of a meta element, having empty elements is typically not a good practice. The meta element (and link for URIs) can be used for Microdata exactly for this purpose.

Option 2: It’s of course also possible to use meta and duplicate the content to make it visible, but this is also not a good practice. Why duplicate something if there is a way to prevent it?

Option 1: Yes, it’s invalid.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme