Multiple occurences of same itemprop in Microdata schema.org

前端 未结 1 586
后悔当初
后悔当初 2020-12-07 04:10

I tested My microdata schema.org on google:

The google tools did not return any error...

**Item** 
    type:   http://schema.org/webpage
    property         


        
相关标签:
1条回答
  • 2020-12-07 04:49

    You can have the same property several times for the same item (for example, to specify Schema.org’s name in different languages). But note that Microdata doesn’t define what it should mean when there is the same property more than one time specified.

    So something like this is totally fine:

    <html itemscope itemtype="http://schema.org/WebPage">
      <body>
        <div itemprop="text">…</div>
        <div itemprop="text">…</div>
      </body>
    </html>
    

    (Note that there may be a problem with your specific example: Schema.org’s text property expects Text, but you are using another item as value. It’s not forbidden, though.)

    (Also note that the case matters, so it has to be http://schema.org/WPHeader instead of http://schema.org/wpheader. Same with http://schema.org/WebPage.)

    0 讨论(0)
提交回复
热议问题