Microdata Project

Microdata uses simple attributes in HTML tags to assign brief and descriptive names to items and properties. Here’s an example of a short HTML block showing basic contact information for Bob Smith.

Here is the same HTML marked up with microdata.

Here’s how this sample works.

In the first line,

indicates that the content in the

is an item.

indicates that the item is a Person.
Each property of the Person item is identified with the

attribute. For example,

describes the person’s name.

Nested entities

The example above shows contact information about Bob Smith, but it doesn’t include his address. The example below shows the same HTML, but in this case, it includes the


Here’s how this sample works:


property is itself an item, containing its own set of properties. This is indicated by putting the

attribute on the item that declares the

property, and using the

attribute to specify the type of item being described, like this:

For more examples, see Nested items.

Referred items

You can define an item in one location and then refer to it from one or more other locations. The example below describes an address, and then lists two people (Bob and Jane Smith) who live at the address.

Here’s how this sample works:

The HTML that defines the

item includes an

attribute, like this:


items for Bob and Jane Smith refer to the address by including an

attribute and specifying the id the address, like this:

Date and time information

To specify dates and times unambiguously, use the

element with the

attribute. Here, the

property indicates the start date of an event. The value in the

attribute is specified using the ISO date format. Using this format lets you provide search engines with detailed date, time and—optionally—time zone in ISO format (“

“), while still displaying the date on your page in a user-friendly way (“15 October 2009, 7PM”).

Non-visible content

In general, Google won’t display content that is not visible to the user. In other words, don’t show content to users in one way, and use hidden text to mark up information separately for search engines and web applications. You should mark up the text that actually appears to your users when they visit your web pages.

There are a few exceptions to this guideline. In some situations it can be valuable to provide search engines with more detailed information, even if you don’t want that information to be seen by visitors to your page. For example, if a restaurant has a rating of 8.5, users (but not search engines) will assume that the rating is based on a scale of 1–10. In this case, you can indicate this using the

element, like this:

Here’s how this sample works:


tag is used to specify additional information that is not visible on the page—in this case, the fact that the “best possible” rating is 10. The value of the property is specified using the


Similarly, providing the duration of an event in ISO duration format can help ensure that it appears correctly in search results, like this:

Here’s how this sample works:

Use the

tag to specify the value of the property (in this case a duration). This allows you to use the value of the

attribute (“PT1H30M”) to specify the duration in ISO 8601 duration format, while still displaying the duration in user-friendly text (“1 hour 30 minutes”) on the page itself.
Google looks at the parent element of the

element to identify what information that is being represented in an alternate way inside the

tag. So in this case, it is important to make sure that the immediate parent node of the

tag wraps around the text “1 hour 30 minutes”.

Group together and make a difference