Skip to main content

HTML Guide

The “itemtype” attribute must not be specified on elements that do not have an “itemscope” attribute specified.

When the itemtype attribute is specified on an HTML element, the boolean attribute itemscope must also be present in that element.

Here’s an example of how to use the itemscope attribute with the itemtype attribute:

<div itemscope itemtype="http://schema.org/Person">
  <p><span itemprop="name">Liza Jane</span></p>
  <p><span itemprop="email">liza.jane@example.com</span></p>
</div>

In this example, the itemscope attribute is used to indicate that the div element is a microdata item, and the itemtype attribute is used to specify that the type of this item is http://schema.org/Person.

If you don’t need to specify a type for the data represented by the HTML element, you can simply remove the itemtype attribute. For example:

<div itemscope>
  <p><span itemprop="name">John Doe</span></p>
  <p><span itemprop="email">john.doe@example.com</span></p>
</div>

Learn more:

Related W3C validator issues