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

Html 将schema.org中的'QuantitativeValue'放入'td'元素,html,microdata,schema.org,Html,Microdata,Schema.org,我将以下代码作为我的产品的一部分: <tr> <th>Width:</th> <td itemprop="width" href="http://schema.org/QuantitativeValue"> <?php echo $product->width."mm"; ?> </td> </tr> 宽度: 不幸的是,它会产生以下错误: 此时元素td上不允许使用属性hr

我将以下代码作为我的
产品的一部分

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

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

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

需要一个项(或)作为值

所以你需要这样的东西:

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

另请参见我的答案。