Reputation: 131
For a microdata parser I'm writing I parsed the following (simplified) html source:
<html itemscope itemtype="http://schema.org/Article" class="no-js" lang="nl">
<head>
<meta itemprop="name" content="Some article name">
</head>
<body>
<div itemscope itemtype="http://schema.org/Movie">
<span itemprop="name">Skyfall</span>
</div>
</body>
</html>
Couple of questions about this:
Any help would be appreciated.
Upvotes: 1
Views: 427
Reputation: 96527
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"
Upvotes: 2