schemaorg-coda :: Example

eg-0211

From v29.4

JSON-LD

{
  "@context": "https://schema.org",
  "@type": "MusicAlbum",
  "name": "King of Limbs",
  "byArtist": {
    "@type": "MusicGroup",
    "name": "Radiohead"
  },
  "track": {
    "@type": "ItemList",
    "numberOfItems": 8,
    "itemListElement": [
      {
        "@type": "ListItem",
        "position": 1,
        "item": {
          "@type": "MusicRecording",
          "name": "Bloom"
        }
      },
      {
        "@type": "ListItem",
        "position": 2,
        "item": {
          "@type": "MusicRecording",
          "name": "Morning Mr. Magpie"
        }
      },
      {
        "@type": "ListItem",
        "position": 3,
        "item": {
          "@type": "MusicRecording",
          "name": "Little by Little"
        }
      }
    ]
  }
}

RDFa

<div vocab="https://schema.org/" typeof="MusicAlbum">
  <span property="name">King of Limbs</span>
  <span property="byArtist">Radiohead</span>
  <div property="track" typeof="ItemList">
    <meta property="numberOfItems" content=8 />
    <div property="itemListElement" typeof="ListItem">
      <span property="position">1</span>
      <div property="item" typeof="https://schema.org/MusicRecording">
        <span property="name">Bloom</span>
      </div>
    </div>
    <div property="itemListElement" typeof="ListItem">
      <span property="position">2</span>
      <div property="item" typeof="MusicRecording">
        <span property="name">Morning Mr. Magpie</span>
      </div>
    </div>
    <div property="itemListElement" typeof="ListItem">
      <span property="position">3</span>
      <div property="item" typeof="MusicRecording">
        <span property="name">Little by Little</span>
      </div>
    </div>
  </div>
</div>

Microdata

<div itemscope itemtype="https://schema.org/MusicAlbum">
    <span itemprop="name">King of Limbs</span> <span itemprop="byArtist">Radiohead</span>
    <div itemprop="track" itemscope itemtype="https://schema.org/ItemList">
        <meta itemprop="numberOfItems" content="8">
        <div itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
            <span itemprop="position">1</span>
            <div itemprop="item" itemscope itemtype="https://schema.org/MusicRecording">
                <span itemprop="name">Bloom</span>
            </div>
        </div>
        <div itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
            <span itemprop="position">2</span>
            <div itemprop="item" itemscope itemtype="https://schema.org/MusicRecording">
                <span itemprop="name">Morning Mr. Magpie</span>
            </div>
        </div>
        <div itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
            <span itemprop="position">3</span>
            <div itemprop="item" itemscope itemtype="https://schema.org/MusicRecording">
                <span itemprop="name">Little by Little</span>
            </div>
        </div>
    </div>
</div>

Pre-Markup

King of Limbs - Radiohead
Tracks:
1. Bloom
2. Morning Mr. Magpie
3. Little by Little