本文介绍了schema.org产品可用性标记标记的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

哪一个是正确的?

<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?

推荐答案

使用 span 内容属性无效。 。

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

使用 meta 无效 。 HTML5和微数据要求 。

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

使用链接是正确的。它也用于。如果某些示例使用 meta ,我们可能会认为这些。

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.

这篇关于schema.org产品可用性标记标记的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-21 23:57