schemaorg-coda :: Example

eg-0235

From v29.4

JSON-LD

{
    "@context": "https://schema.org",
    "@type": "WebPage",
    "name": "Middle exchange rates of foreign currencies – table A",
    "mainEntity": {
      "@type": "ItemList",
      "name": "Table No. 047/A/NBP/2016 of 2016-03-09",
      "itemListElement": [
          {
            "@type": "ExchangeRateSpecification",
            "currency":"EUR",
            "currentExchangeRate":{
              "@type": "UnitPriceSpecification",
              "price": "4.3215",
              "priceCurrency": "PLN"
              }
          },
          {
            "@type": "ExchangeRateSpecification",
            "currency":"BRL",
            "currentExchangeRate":{
              "@type": "UnitPriceSpecification",
              "price": "1.0490",
              "priceCurrency": "PLN"
              }
          }
      ]
    }
  }

RDFa

<body vocab="https://schema.org/" typeof="WebPage">
<h1 property="name">Middle exchange rates of foreign currencies – table A</h1>
<div property="mainEntity" typeof="ItemList">
<table>
  <caption property="name">Table No. 047/A/NBP/2016 of 2016-03-09</caption>
  <tr>
    <th>Currency</th>
    <th>Code</th>
    <th>Mid-rate </th>
  </tr>
  <tr property="itemListElement" typeof="ExchangeRateSpecification">
    <td property="currency" content="EUR">Euro</td>
    <td>1 EUR</td>
    <td property="currentExchangeRate" typeof="UnitPriceSpecification">
      <span property="price">4.3215</span>
      <meta property="priceCurrency" content="PLN"/>
    </td>
  </tr>
  <tr property="itemListElement" typeof="ExchangeRateSpecification">
    <td property="currency" content="BRL">Brazilian Real</td>
    <td>1 BRL</td>
    <td  property="currentExchangeRate" typeof="UnitPriceSpecification">
      <span property="price">1.0490</span>
      <meta property="priceCurrency" content="PLN"/>
    </td>
  </tr>
</table>
</div>
</body>

Microdata

<body itemscope itemtype="https://schema.org/WebPage">
<h1 itemprop="name">Middle exchange rates of foreign currencies – table A</h1>
<div itemprop="mainEntity" itemscope itemtype="https://schema.org/ItemList">
<table>
  <caption itemprop="name">Table No. 047/A/NBP/2016 of 2016-03-09</caption>
  <tr>
    <th>Currency</th>
    <th>Code</th>
    <th>Mid-rate </th>
  </tr>
  <tr itemprop="itemListElement" itemscope itemtype="https://schema.org/ExchangeRateSpecification">
    <td itemprop="currency" content="EUR">Euro</td>
    <td>1 EUR</td>
    <td itemprop="currentExchangeRate" itemscope itemtype="https://schema.org/UnitPriceSpecification">
      <span itemprop="price">4.3215</span>
      <meta itemprop="priceCurrency" content="PLN"/>
    </td>
  </tr>
  <tr itemprop="itemListElement" itemscope itemtype="https://schema.org/ExchangeRateSpecification">
    <td itemprop="currency" content="BRL">Brazilian Real</td>
    <td>1 BRL</td>
    <td  itemprop="currentExchangeRate" itemscope itemtype="https://schema.org/UnitPriceSpecification">
      <span itemprop="price">1.0490</span>
      <meta itemprop="priceCurrency" content="PLN"/>
    </td>
  </tr>
</table>
</div>
</body>

Pre-Markup

<body>
<h1>Middle exchange rates of foreign currencies – table A</h1> <h2>Table No. 047/A/NBP/2016 of 2016-03-0</h2> <div> <table>
  <tr>
    <th>Currency</th>
    <th>Code</th>
    <th>Mid-rate </th>
  </tr>
  <tr>
    <td>Euro</td>
    <td>1 EUR</td>
    <td>4.3215</td>
  </tr>
  <tr>
    <td>Brazilian Real</td>
    <td>1 BRL</td>
    <td>1.0490</td>
  </tr>
</table>
</div>
</body>