Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Insert price currency microdata (schema.org) into a html table

I have following piece of code:

<tr><th>Availability:</th>
  <td><link itemprop="availability" href="http://schema.org/InStock"/>available</td></tr>
<tr><th>Price:</th>
  <td itemprop="price">$137</td></tr>
<meta itemprop="priceCurrency" content="USD" />
</tbody>

Unfortunately, it doesn't validate: Start tag meta seen in table.

How can I insert price currency and have validation correct?

like image 723
pixel Avatar asked Feb 13 '23 10:02

pixel


1 Answers

You could put the meta element in the td and move the price property to a span (otherwise the price value would include the string "USD").

<tr>
  <th>Price:</th>
  <td>
    <span itemprop="price">137</span>
    <meta itemprop="priceCurrency" content="USD" />
  </td>
</tr>
like image 77
unor Avatar answered Feb 16 '23 02:02

unor