0

I just wanna ask if I can use meta tags to all properties in Schema.org or use it whenever I want?

Example:

<div itemscope itemtype="http://schema.org/Product">
   <div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">

       <meta itemprop="ratingValue" content="2" /> 
       <meta itemprop="reviewCount" content="144" />
   </div>
   <meta itemprop="name" content="name here">
   <meta itemprop="description" content="description" />
</div>

Because I don't know if I'm already abusing the use of meta tags and also I don't wanna make those things visible to the page.

unor
  • 92,415
  • 26
  • 211
  • 360

1 Answers1

0

You can’t use the meta element for all properties, but for many.

In Microdata, property values can have 4 different types:

  • string
  • datetime
  • URL
  • item

The meta element can only be used if the value should be a string.

For a datetime value, Microdata defines that the time element should be used (but in practice, using meta should work here, too).

HTML5 defines another element that is by default hidden: link. This must be used instead of meta if the value is a URL. So in Microdata you’d use link if the value should be a URL.

For an item value, neither meta nor link can be used, so you have to use a different element (like div).

Schema.org

In Schema.org, each property has an expected value. Some also have multiple expected values. And note that this is just a recommendation, you don’t have to follow it.

Example:

  • For name, it’s Text. So you could use a meta element.
  • For url, it’s URL. So you could use a link element.
  • For parent, it’s another item (Person). So you could use a div/span (or a more appropriate) element.
Community
  • 1
  • 1
unor
  • 92,415
  • 26
  • 211
  • 360