Skip to content Skip to sidebar Skip to footer

Nested Microdata Itemscope Without Itemprop

For a microdata parser I'm writing I parsed the following (simplified) html source:

Solution 1:

When providing the DOCTYPE and the missing title element, this is valid HTML5+Microdata.

The Article and the Movie in your example have no relation, so these are two separate top-level items:

Article
name: "Some article name"

Movie
name: "Skyfall"

Items are only related via itemprop, not by plain HTML-level nesting.

For example, using the about property as in:

<div itemscope itemtype="http://schema.org/Article">
  <h1 itemprop="name">Some article name</h1>
  <div itemprop="about" itemscope itemtype="http://schema.org/Movie">
    <span itemprop="name">Skyfall</span>
  </div>
</div>

would result in:

Article
name: "Some article name"
about: 
    Movie
    name: "Skyfall"

Post a Comment for "Nested Microdata Itemscope Without Itemprop"