Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

With regard to Microdata I was wondering if the elements must be exactly like the examples (http://support.google.com/webmasters/bin/answer.py?hl=en&answer=176035) 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
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: http://www.whatwg.org/specs/web-apps/current-work/multipage/microdata.html

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.