html5 - Product size: width, height and depth -
i'm using schema.org definition represent product. have doubt product size: should specify unit of measure in field?
here's code (i need separate span "cm" style differently):
<div itemscope itemtype="http://schema.org/product"> <h1 itemprop="name">product name</h1> size: <span itemprop="width">60 <span>cm</span></span> <span itemprop="height">50 <span>cm</span></span> <span itemprop="depth">40 <span>cm</span></span> </div> is correct way define size?
the width/depth/height properties expect distance or quantitativevalue value.
if want use distance:
as distance type not seem define suitable property provide actual value, , description says values have
[…] form '<number> <length unit of measure>'. e.g., '7 ft'.
i assume type should not provided explicitly, e.g.:
<span itemprop="width"> 60 <span>cm</span> </span> if type should provided, guess using name option:
<span itemprop="width" itemscope itemtype="http://schema.org/distance"> <span itemprop="name">60 <span>cm</span></span> </span> if want 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 un/cefact code "cm" (= cmt) in meta element (which allowed in body, if use microdata), use data element:
<span itemprop="width" itemscope itemtype="http://schema.org/quantitativevalue"> <span itemprop="value">60</span> <data itemprop="unitcode" value="cmt">cm</data> </span>
Comments
Post a Comment