Nestet Microdata结构与Schema.org [英] Nestet Microdata structure with Schema.org

查看:100
本文介绍了Nestet Microdata结构与Schema.org的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



 < div itemscope =itemtype =http: //schema.org/WebPage\"> 
< div itemprop =creator>
< div itemscope =itemtype =http://schema.org/Article>
< / div>
< / div>
< / div>





所以这会给你:

 < div itemscope itemtype =http://schema.org/WebPage> 

< div itemprop =creatoritemscope itemtype =http://schema.org/Person>
< / div>

<! - 和/或 - >

< div itemprop =aboutitemscope itemtype =http://schema.org/Article>
< / div>

< / div>







剂量 itemprop =name属于 itemtype =http://schema.org/Article


是的,总是到最近的父母 itemscope


我可以在一个元素中使用两个或多个 itemprop 吗?


不,您不能在同一元素上添加多个 itemprop 属性。但是,您可以 itemprop 属性中包含多个属性。



但是,请确保所有属性都具有相同的值。 Schema.org的 name (期望 Text )和 url (期望 URL )。如果在 a 上指定,则该值将是 href 属性的值,而不是 a 元素。


Can you please tell me if this structure is correct?

<div itemscope="" itemtype="http://schema.org/WebPage">
   <div itemprop="creator">
      <div itemscope="" itemtype="http://schema.org/Article">
           <a itemprop="URL" itemprop="name"><a/>
      </div>
   </div>
</div>

  • Is this structure correctly nested?

  • Does itemprop="name" belong to itemtype="http://schema.org/Article"?

  • Can I use two or more itemprop in one element?

解决方案

So this would give you:

<div itemscope itemtype="http://schema.org/WebPage">

  <div itemprop="creator" itemscope itemtype="http://schema.org/Person">
    <a itemprop="url"href="…"><span itemprop="name">…</span></a>
  </div>

  <!-- and/or -->

  <div itemprop="about" itemscope itemtype="http://schema.org/Article">
    <a itemprop="url" href="…"><span itemprop="name">…</span></a>
  </div>

</div>


Dose itemprop="name" belong to itemtype="http://schema.org/Article"?

Yes, always to its nearest parent itemscope.

Can I use two or more itemprop in one element?

No, you can’t add several itemprop attributes on the same element. But you can have several properties in one itemprop attribute.

However, make sure that all the properties expect the same value. This is not the case with Schema.org’s name (expects Text) and url (expects URL). If specified on a, the value will be the value of the href attribute, not the value of the a element.

这篇关于Nestet Microdata结构与Schema.org的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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