使用HTML5 + Microdata的< meta> < body>中的标签 [英] Using HTML5+Microdata's <meta> tag in the <body>

查看:84
本文介绍了使用HTML5 + Microdata的< meta> < body>中的标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用 Schema.org <meta>标签指定产品是否有货" >.

I want to specify if the Product is "In Stock" using HTML5+Microdata's <meta> tag using Schema.org.

我不确定这是否是正确的语法:

I am unsure if this is the correct syntax:

<div itemscope itemtype="http://schema.org/Product">
  <h2 itemprop="name">Product Name</h2>
  <dl itemprop="offers" itemscope itemtype="http://schema.org/Offer">
    <dt itemprop="price">$1</dt>
    <meta itemprop="availability" itemscope itemtype="http://schema.org/ItemAvailability" itemid="http://schema.org/InStock">
  </dl>
</div>

推荐答案

meta标记不能与这样的itemscope一起使用.正确的表达方式是使用link标签的规范引用:

The meta tag can't be used with an itemscope like that. The correct way to express this is through a canonical reference using the link tag:

<div itemscope itemtype="http://schema.org/Product">
  <h2 itemprop="name">Product Name</h2>
  <dl itemprop="offers" itemscope itemtype="http://schema.org/Offer">
    <dt itemprop="price">$1</dt>
    <link itemprop="availability" href="http://schema.org/InStock">
  </dl>
</div>

这篇关于使用HTML5 + Microdata的&lt; meta&gt; &lt; body&gt;中的标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆