Product size: width, height and depth

我是研究僧i 提交于 2019-12-01 06:29:42
unor

The width/depth/height properties expect Distance or QuantitativeValue as value.

If you want to use Distance:

As the Distance type does not seem to define a suitable property to provide the actual value, and its description says that values have

[…] the form '<Number> <Length unit of measure>'. E.g., '7 ft'.

I assume that the type should not be provided explicitly, e.g.:

<span itemprop="width">
  60 <span>cm</span>
</span>

If the type should be provided, I guess using name is the only option:

<span itemprop="width" itemscope itemtype="http://schema.org/Distance">
  <span itemprop="name">60 <span>cm</span></span>
</span>

If you want to use QuantitativeValue:

<span itemprop="width" itemscope itemtype="http://schema.org/QuantitativeValue">
  <span itemprop="value">60</span>
  <span>cm</span>
  <meta itemprop="unitCode" content="CMT" />
</span>

Instead of specifying the UN/CEFACT code for "cm" (= CMT) in a meta element (which is allowed in the body, if you use it for Microdata), you could also use the data element:

<span itemprop="width" itemscope itemtype="http://schema.org/QuantitativeValue">
  <span itemprop="value">60</span>
  <data itemprop="unitCode" value="CMT">cm</data>
</span>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!