将schema.org中的`QuantitativeValue`放入`td`元素中

时间:2014-03-16 14:48:56

标签: html5 microdata schema.org

我将以下代码作为Product的一部分:

<tr>
   <th>Width:</th>
   <td itemprop="width" href="http://schema.org/QuantitativeValue">
      <?php echo $product->width."mm"; ?>
   </td>
</tr>

不幸的是,它会产生以下错误:

  

此时元素href上不允许使用属性td

1 个答案:

答案 0 :(得分:1)

width property期望一个项目(DistanceQuantitativeValue)为值。

所以你需要这样的东西:

<td itemprop="width" itemscope itemtype="http://schema.org/QuantitativeValue">
</td>