Sign up ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

With regard to Microdata I was wondering if the elements must be exactly like the examples ( or that Google/Bing look if the itemprop attributes occur on certain elements.

For example, could I replace this:

<div itemprop="name">some text</div>

with this:

<span itemprop="name">some text</span>

without affecting its functionality?

share|improve this question

2 Answers 2

up vote 2 down vote accepted

The type of tag can be either div or span without changing how micro-data is extracted. Here is a site giving examples with itemprop on a span tag:

The best way to know for sure that Google will accept your markup, is to test it with the Google Structured Data Tool.

share|improve this answer

Yes, you may use any HTML5 element for Microdata.

Bute note that some elements come with special rules:

  • elements with href/src attribute (e.g., a, link, img, etc.) create a URI as value
  • the time element creates a datetime as value

All other elements create a string as value. This is usually the element’s content, but in some cases it’s the value of an attribute:

  • for meta elements: the value of the content attribute
  • for data and meter elements: the value of the value attribute
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.