【发布时间】:2018-06-10 10:18:12
【问题描述】:
我已经改编了来自http://schema.org/ItemList 上的示例 2 的代码
如何与Product 一起使用?在首页和其他一些页面上,我有一个产品列表,我希望对其进行更好的标记。
以下代码给出了错误
位置字段的值是必需的。
但是Product 没有位置,所以如果position 有一个值,它会给出不同的错误。
<ul itemscope itemtype="http://schema.org/ItemList">
<meta itemprop="numberOfItems" content="10" />
<li itemprop="itemListElement" itemscope itemtype="http://schema.org/Product">
<!-- <meta itemprop="position" content="1" /> -->
<a href="#" itemprop="url">
<img src="asdf.jpg" itemprop="image">
<div class="product-list__title" itemprop="name">
Product name
</div>
<div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
<div itemprop="price">
$12
</div>
<link itemprop="availability" href="http://schema.org/InStock" />
</div>
</a>
</li>
</ul>
【问题讨论】:
标签: schema.org microdata