3

<meta>UserInteraction http://schema.org/UserInteractionを表示するために使用する必要がありますか、それともspanを使用できますか

この方法でのみ使用する必要があります

<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>

または私は使用できますか

<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>

また、Googleや他のエンジンは、レビューや記事に対してユーザーのいいねやコメントを表示します

4

2 に答える 2

2

どちらかを使用できます。セマンティックディファレンスはありません。実際、 Microdata仕様のセクション2.2の最後の例を見ると、次のような例が示されています。

たとえば、次の2つの例の間に意味上の違いはありません。

<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>
于 2011-11-07T13:02:06.673 に答える
1

私はそれに対する答えを得ようとしています。ただし、メタ要素の外部でコンテンツを使用できるとは思わないので、この例は有効ではないと思います。

理想的には、おそらくデータ要素に配置します

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

value属性は「マシン値」であると想定されていますが、現時点でこれがどの程度サポートされているかはわかりません。

于 2011-11-07T17:37:09.447 に答える