0

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?

416E64726577
  • 2,214
  • 2
  • 23
  • 47
user3307827
  • 556
  • 1
  • 7
  • 20
  • user3307827, I rolled-back your edit. Please don’t introduce additional questions that are not directly related to your initial code. If you have a question about other code, you should create another question. – unor Mar 09 '14 at 15:18

2 Answers2

1

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.

Community
  • 1
  • 1
unor
  • 92,415
  • 26
  • 211
  • 360
  • I use an alternative way to use URL and Name...Do you think it is true or I must use URL in tag? – user3307827 Mar 09 '14 at 15:21
  • @user3307827: See [my comment](http://stackoverflow.com/questions/22283292/nestet-microdata-structure-with-schema-org#comment33853159_22283292) to your question: Please don’t add additional questions that aren’t directly related to your initial code. – unor Mar 09 '14 at 15:24
  • Thanks anyway for your great help :) – user3307827 Mar 09 '14 at 15:35
0

This line

<a itemprop="URL" itemprop="name"><a/><br />

should be

<a itemprop="URL" itemprop="name"></a>

Read Extending HTML5 — Microdata

Andrei Sfat
  • 8,440
  • 5
  • 49
  • 69
onion
  • 1