Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 958
BlueMark Avatar asked Aug 05 '14 21:08

BlueMark


People also ask

What is product schema markup and how to get started?

This is everything you need to know to get started with schema markup. What is Product Schema Markup? Product schema markup is code that is embedded in your website. It is structured data of your product that publishes alongside your product in search results. Its purpose is to help search engines provide better results to users.

What is schema?

Getting Started - schema.org Schema.org is a set of extensible schemas that enables webmasters to embed structured data on their web pages for use by search engines and other applications. Schema.org Documentation Schemas About Note: you are viewing the development version of Schema.org. See How we workfor more details.

Can you extend schema Org?

Extending schema.org Most sites and organizations will not have a reason to extend schema.org. However, schema.org offers the ability to specify additional properties or sub-types to existing types. If you are interested in doing this, read more about the schema.org extension mechanism.

What is seoclarity schema Dev for Chrome?

This is why seoClarity developed its plug-in called schema.dev for Google Chrome. This plug-in allows you to create one template to deploy product schema markup across all of your product pages simultaneously. This saves you a great deal of time and money. It also reduces the occurrence of human error.


2 Answers

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.

like image 67
unor Avatar answered Oct 17 '22 00:10

unor


<link itemprop="availability" href="http://schema.org/InStock">

is probably best since it most closely adheres to the Enumeration that is https://schema.org/ItemAvailability.

I wouldn't use the 3rd example (<span itemprop="availability" content="in_stock"></span>) because in_stock may not map exactly to the values listed.

like image 22
Nelu Avatar answered Oct 16 '22 23:10

Nelu