Appearance
Formats
ReferenceThe same item, a Movie named Avatar directed by James Cameron, expressed in each of the three syntaxes.
JSON-LD
html
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Movie",
"name": "Avatar",
"director": {
"@type": "Person",
"name": "James Cameron"
},
"genre": "Science fiction"
}
</script>Microdata
html
<div itemscope itemtype="https://schema.org/Movie">
<h1 itemprop="name">Avatar</h1>
<div itemprop="director" itemscope itemtype="https://schema.org/Person">
<span itemprop="name">James Cameron</span>
</div>
<span itemprop="genre">Science fiction</span>
</div>RDFa Lite
html
<div vocab="https://schema.org/" typeof="Movie">
<h1 property="name">Avatar</h1>
<div property="director" typeof="Person">
<span property="name">James Cameron</span>
</div>
<span property="genre">Science fiction</span>
</div>Attribute map
| Concept | JSON-LD | Microdata | RDFa Lite |
|---|---|---|---|
| Vocabulary | @context | implied by itemtype | vocab |
| Type | @type | itemtype with itemscope | typeof |
| Property | key name | itemprop | property |
| Identifier | @id | itemid | resource |