2

I tested My microdata schema.org on google:

The google tools did not return any error...

**Item** 
    type:   http://schema.org/webpage
    property:   
    url:    http://127.0.0.1/
    image:  http://127.0.0.1/design/logo.jpg
    datemodified:   2014-03-05 20:12:56
    text:   
    Item 1
    breadcrumb: Skip to content
    text:   
    Item 2



    **Item 1**
    type:   http://schema.org/wpheader
    property:   
    url:    http://127.0.0.1
    headline:   website name
    image:  http://127.0.0.1/design/logo.jpg
    description:    some text


    **Item 2**
    type:   http://schema.org/sitenavigationelement

You can see I used multiple itemprop="text" for the webpage type...

Is it valid?

If yes you know itemprop="url" for WebPage type is invalid... or itemListElement for ItemList is valid. How can I recognize which itemprop is valid and which one is invalid?

----------------///EDIT///-------------------

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

<div itemprop="text" itemscope="itemscope" itemtype="http://schema.org/SiteNavigationElement">
...
</div>
</body>
</html>
Mikael Engver
  • 4,634
  • 4
  • 46
  • 53
user3307827
  • 556
  • 1
  • 7
  • 20

1 Answers1

4

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.)

Community
  • 1
  • 1
unor
  • 92,415
  • 26
  • 211
  • 360
  • So according to your answer If I changed
    tag in your example to
    ,it is correct!right?
    – user3307827 Mar 11 '14 at 22:32
  • @user3307827: That’s hard to answer. This is correct Microdata, yes. But Schema.org wants you to use a value consisting of text here, and not (like in your example) a value consisting of another type (`SiteNavigationElement`). But it’s probably not an error (see ["Expected types" on schema.org](http://schema.org/docs/gs.html#schemaorg_expected)). It’s an *expected* (and not a *required*) type after all. So yes, you may probably use it like that. – unor Mar 12 '14 at 00:32