Skip to content

Formats

Reference

The 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

ConceptJSON-LDMicrodataRDFa Lite
Vocabulary@contextimplied by itemtypevocab
Type@typeitemtype with itemscopetypeof
Propertykey nameitempropproperty
Identifier@iditemidresource