什么是事件的正确丰富的片段微数据?

时间:2011-06-06 23:26:14

标签: html5

我正在尝试为我网站上的活动实施微数据。当我使用Google Rich Snippet Testing工具时,我不断收到错误“数据不足以生成预览”。

有人知道他们想要什么数据的明确清单吗?

这些东西太麻烦了,不能花时间实施吗?我的目标是获得更好的搜索引擎优化结果。

由于

3 个答案:

答案 0 :(得分:2)

这:

<div>
<a href="http://www.example.com/events/spinaltap">Spinal Tap</a>
<img src="spinal_tap.jpg" />

After their highly-publicized search for a new drummer,
Spinal Tap kicks off their latest comeback tour with a San
Francisco show.

When: Oct 15, 7:00PM—9:00PM

Where: Warfield Theatre, 982 Market St, San Francisco, CA

Category: Concert

</div>

会变成:

<div itemscope itemtype="http://data-vocabulary.org/Event">
  <a href="http://www.example.com/events/spinaltap" itemprop="url" >

    <span itemprop="summary">Spinal Tap</span>

  </a>
   <img itemprop="photo" src="spinal_tap.jpg" />

  <span itemprop="description">After their highly-publicized search for a new drummer,
   Spinal Tap kicks off their latest comeback tour with a San
   Francisco show.</span>

  When:
  <time itemprop="startDate" datetime="2015-10-15T19:00-08:00">Oct 15, 7:00PM</time>—
  <time itemprop="endDate" datetime="2015-10-15T19:00-08:00">Oct 15, 9:00PM</time>

  Where:

    <span itemprop="location" itemscope itemtype="http://data-vocabulary.org/​Organization">

    <span itemprop="name">Warfield Theatre</span>

     <span itemprop="address" itemscope itemtype="http://data-vocabulary.org/Address">

         <span itemprop="street-address">982 Market St</span>, 

         <span itemprop="locality">San Francisco</span>, 

         <span itemprop="region">CA</span>

     </span>

     <span itemprop="geo" itemscope itemtype="http://data-vocabulary.org/​Geo">
        <meta itemprop="latitude" content="37.774929" />
        <meta itemprop="longitude" content="-122.419416" />
     </span>
  </span>

  Category: <span itemprop="eventType">Concert</span> 
</div>

请确保html以类似的方式工作。

答案 1 :(得分:0)

即使格式良好的页面包含schema.org标记,我也发现Google仍然依赖于一些较旧的代码段要求。您可以在http://support.google.com/webmasters/bin/answer.py?hl=en&answer=164506&topic=1088474&ctx=topic找到这些活动的要求。向下滚动到“属性”标题,您将看到一些标记为粗体。确保您的标记包含这些属性

答案 2 :(得分:0)

这是一个非常简单的例子:

<div itemscope itemtype="http://schema.org/Event">
  <a itemprop="url" href="nba-miami-philidelphia-game3.html">
  NBA Eastern Conference First Round Playoff Tickets:
  <span itemprop="name"> Miami Heat at Philadelphia 76ers - Game 3 (Home Game 1) </span>
  </a>
  <meta itemprop="startDate" content="2016-04-21T20:00">
    Thu, 04/21/16
    8:00 p.m.
  <div itemprop="location" itemscope itemtype="http://schema.org/Place">
    <a itemprop="url" href="wells-fargo-center.html">
    Wells Fargo Center
    </a>
    <div itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
      <span itemprop="addressLocality">Philadelphia</span>,
      <span itemprop="addressRegion">PA</span>
    </div>
  </div>
  <div itemprop="offers" itemscope itemtype="http://schema.org/AggregateOffer">
    Priced from: <span itemprop="lowPrice">$35</span>
    <span itemprop="offerCount">1938</span> tickets left
  </div>
</div>

有关详细信息和示例,请转到http://schema.org/Event,滚动到“示例”,选择“微数据”。