HTML5 – Microdata and schema.org

Microdata is a way to annotate HTML elements with additional information that can be used by search engines and other applications. Microdata uses the itemscope, itemprop, and itemtype attributes to define the properties of an item and the type of the item.

Here is an example of how to use microdata to annotate an HTML element:

<div itemscope itemtype="http://schema.org/Person">
  <span itemprop="name">John Doe</span>
  <span itemprop="jobTitle">Software Engineer</span>
</div>

In this example, the itemscope attribute is used to define the start of an item, the itemtype attribute is used to specify the type of the item (a person in this case), and the itemprop attributes are used to specify the properties of the item (name and job title).

You can also use the itemref attribute to reference additional properties that are defined elsewhere in the HTML page:

<div itemscope itemtype="http://schema.org/Person" itemref="email-address">
  <span itemprop="name">John Doe</span>
  <span itemprop="jobTitle">Software Engineer</span>
</div>
<span id="email-address" itemprop="email">johndoe@example.com</span>

In this example, the itemref attribute is used to reference an element with the id of "email-address", which has the itemprop attribute of "email".

You can use the schema.org vocabulary to define the types and properties of your items. schema.org is a collaborative, community activity with a mission to create, maintain, and promote a core vocabulary for describing the things on the web. You can use the schema.org types and properties to annotate your HTML elements and provide additional information about your content.