典型的LocalBusiness产品类别WebPage微数据结构

时间:2015-06-06 05:11:54

标签: schema.org microdata

我有一个网站,通常描述一个Organization / LocalBusiness / FurnitureStore及其销售的内容:品牌(非拥有),产品类别,单一产品(非拥有),服务类别和单一服务(拥有)。 我需要帮助来定义整个网站的最佳/正确的微数据结构。 我想帮助一个简单明了的傻瓜示例/教程。

正如所建议的那样,我在不同的帖子中将原始问题分开了。 Read a complete description of the problem »

单个“产品类别”网页

http://www.schiano-arredamenti.it/camerette-per-bambini-e-ragazzi/

一个。 header - FurnitureStore:logonamenav

B中。的 main

  1. 类别name
  2. description
  3. image s(产品图库)
  4. ℃。 footer - FurnitureStorecopyrightHolder网站,vatIDurl至"与我们联系" WebPage(包含addresstelephoneemail等),url至"隐私政策"网页等。

    如果main描述了Offer / Category,则itemscope itemtype="FurnitureStore"应用于body是正确的,以便header和{{footer 1}}微数据被应用?或者最好将itemscope itemtype="Offer"应用于bodyitemprop="seller" header itemref="footer"mainEntityOfPage可以提供帮助吗?有更好的解决方案吗?有什么变化?

1 个答案:

答案 0 :(得分:0)

使用微数据时,您不需要注释" HTML5元素。 HTML5元素只是作为载体,所以说。

所以从Microdata的角度来看,你选择哪一个并不重要:

<div itemscope itemtype="http://schema.org/Thing">
  <h1 itemprop="name">Foo</h1>
</div>
<span itemscope itemtype="http://schema.org/Thing">
  <span itemprop="name">Foo</span>
</span>
<div itemscope itemtype="http://schema.org/Thing">
  <meta itemprop="name" content="Foo" />
</div>
<div itemscope itemtype="http://schema.org/Thing" itemref="bar">
</div>
<div itemprop="name" id="bar">Foo</div>

Microdata完全相同,它只关心解析的名称 - 值对。 (但请注意,某些元素适用于different types of values,因此如果您有日期,则必须使用time,如果您有网址,则必须使用{{ 1}},a等。)。

另请注意,Microdata不关心link - 元素的内容,它只查找itemscope个值。因此,在此示例中,itemprop 不是微数据的一部分:

<p>Foobar</p>

因此,根据其定义选择HTML5元素(即semantic markup),然后在第二步中根据需要应用微数据。如果您的HTML结构不允许您传达的内容(并且您无法更改),则可以根据需要添加<div itemscope itemtype="http://schema.org/Thing"> <p>Foobar</p> </div> meta元素。

tl; dr:只要您能说明,link上使用的itemtype以及body元素上的main无关紧要你要说的是什么。它主要取决于您的HTML结构,以及更容易实现的内容。

相关问题