Question

Should i use <meta> to show UserInteraction http://schema.org/UserInteraction or can i use span

Should i use this way only

<div itemscope itemtype="http://schema.org/Article">
  <span itemprop="name">How to Tie a Reef Knot</span>
  by <span itemprop="author">John Doe</span>
  This article has been tweeted 1203 times and contains 78 user comments.
  <meta itemprop="interactionCount" content="UserTweets:1203"/>
  <meta itemprop="interactionCount" content="UserComments:78"/>
</div>

Or can i use

<div itemscope itemtype="http://schema.org/Article">
  <span itemprop="name">How to Tie a Reef Knot</span>
  by <span itemprop="author">John Doe</span>
  This article has been tweeted 
  <span itemprop="interactionCount" content="UserTweets:1203" >1203</span> times and
  contains <span itemprop="interactionCount" content="UserComments:78">1203</span> 
  user comments.
</div>

Also will Google and other Engines show userlikes and comment no's for reviews and article

Was it helpful?

Solution

You can use either one; there is no semantic difference. In fact, if you look at the last example in section 2.2 of the Microdata spec, it gives an example much like yours:

There is no semantic difference, for instance, between the following two examples:

<figure>
 <img src="castle.jpeg">
 <figcaption>
   <span itemscope><span itemprop="name">The Castle</span></span> (1986)
 </figcaption>
</figure>

<span itemscope><meta itemprop="name" content="The Castle"></span>
<figure>
 <img src="castle.jpeg">
 <figcaption>The Castle (1986)</figcaption>
</figure>

OTHER TIPS

I'm trying to get an answer to that myself. I don't think you can use content outside of a meta element though, so I don't think that the example would be valid.

Ideally I would probably place it in the data element

<data itemprop="interactionCount" value="UserTweets:1203">1203 Tweets</data>
<data itemprop="interactionCount" value="UserComments:78">78 user comments</data>

The value attribute is supposed to be the 'machine value', though I'm not sure of how well this is supported at the moment.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top