Search code examples
htmlsemantic-markupschema.orgmicrodata

schema.org product availability tags markup


Which one is correct?

<link itemprop="availability" href="http://schema.org/InStock">
​<meta itemprop="availability" content="InStock" />
<span itemprop="availability" content="in_stock"></span>

I checked official schema documentation and in examples found all of them.

I suppose all of them will work, but at the moment, is there any preferred standard?


Solution

  • Using span with the content attribute is invalid. Neither HTML5 nor Microdata allow the content attribute for span.

    Using meta is invalid. HTML5 and Microdata require that meta must not be used for URI values.

    Using link is correct. It’s also used in Schema.org’s enumeration guide. If some examples use meta instead, we may expect these to be fixed.