SEO

Microdata: HTML Structured Data & Schema.org Guide

Define machine-readable metadata using Microdata. Implement itemscope and itemprop attributes to structure content for rich results and crawlers.

8.1k
microdata
Monthly Search Volume
Keyword Research

Microdata is an HTML specification that nests machine-readable metadata within your existing web content. It uses vocabulary standards like Schema.org to label elements on your page so search engines understand the difference between a product price and a phone number. [Major search engine operators like Google, Microsoft, and Yahoo! rely on the schema.org vocabulary to improve search results] (MDN).

What is Microdata?

Microdata is [part of the WHATWG HTML Standard] (MDN), designed to provide a declarative way of annotating HTML elements with machine-readable tags. Unlike similar approaches such as RDFa and classic microformats, microdata uses a supporting vocabulary to describe an item and name-value pairs to assign values to its properties.

Each item you mark up creates an Item scope using HTML attributes. You specify the vocabulary URL through itemtype and define properties with itemprop. This structure allows crawlers to extract data like event dates, product prices, or review ratings without ambiguity.

Why Microdata matters

  • Rich search results: Structured data powers enhanced listings like star ratings and event details directly in search results.
  • Cross-engine compatibility: [Google and other major search engines support the Schema.org vocabulary for structured data] (MDN), meaning your markup works across platforms.
  • Regional advantages: [Yandex implemented additional marking parameters that made indexation of Russian-language web-pages considerably more successful] (MDN), solving transliteration issues between Cyrillic and Latin alphabets.
  • Content clarity: Helps search engines distinguish between entities (a movie title versus a person's name).
  • No visual changes: Metadata lives in your existing HTML without altering page design.

How Microdata works

Microdata relies on five global HTML attributes to create structured items:

  1. Create the item: Add itemscope to an HTML element to define that the content within represents a specific item.
  2. Set the vocabulary: Use itemtype with a URL (typically from Schema.org) to specify what kind of item you're describing.
  3. Define properties: Tag elements with itemprop to assign values like names, dates, or prices.
  4. Reference external properties: Use itemref to connect properties that aren't descendants of the itemscope element by referencing their IDs.
  5. Add global identifiers: Optionally include itemid to provide a unique, global identifier for the item.

For nested items (like a review inside a product), you add a new itemscope inside an itemprop, creating a hierarchy that mirrors the relationship between entities.

Common Schema.org vocabularies

While you can design custom vocabularies, re-using existing ones makes content easier to parse. [Commonly used vocabularies include] (MDN):

Category Types
Creative works CreativeWork, Book, Movie, MusicRecording, Recipe, TVSeries
Media AudioObject, ImageObject, VideoObject
Business Organization, LocalBusiness, Restaurant
Commerce Product, Offer, AggregateOffer
Social Person, Review, AggregateRating
Events Event (with startDate and location properties)

Best practices

  • Stick to Schema.org: [Where possible, authors are encouraged to re-use existing vocabularies] (MDN), and major engines specifically support this standard.
  • Validate before publishing: Use the [Schema Markup Validator] (MDN) to extract and verify your microdata structures before going live.
  • Be specific: Use Restaurant instead of just LocalBusiness when applicable. Specific types give search engines more context.
  • Keep it visible: Mark up content that appears on the page. Invisible markup violates guidelines.
  • Avoid mixing formats: Don't combine microdata with RDFa on the same elements. Pick one approach per page.

Common mistakes

  • Missing itemscope: Forgetting to add itemscope means the itemtype has no boundary and properties may bleed into other elements. Fix: Always pair itemtype with itemscope on the same element or a parent wrapper.
  • Confusing itemref with itemid: Using itemref when you mean itemid. itemref points to element IDs elsewhere in the document; itemid provides a global canonical URL for the item itself. Fix: Use itemid for unique identifiers like ISBNs, itemref only when properties live outside the main item container.
  • Custom vocabularies without need: Creating ad-hoc vocabularies when Schema.org already covers your content type. Fix: Check Schema.org first. Only design custom vocabularies for truly unique internal data structures.
  • Invalid nesting: Putting itemscope on elements where properties should belong to the parent item. Fix: Ensure nested items have their own itemscope and that itemprop attributes correctly attach to the intended level.
  • Forgetting price currency: Marking up prices without currency specifications. Fix: Use a meta tag with itemprop="priceCurrency" when the currency isn't visible text.

Examples

Software application markup:

<div itemscope itemtype="https://schema.org/SoftwareApplication">
  <span itemprop="name">Angry Birds</span> - REQUIRES 
  <span itemprop="operatingSystem">ANDROID</span><br>
  <link itemprop="applicationCategory" href="https://schema.org/SoftwareApplication" />
  <div itemprop="aggregateRating" itemscope itemtype="https://schema.org/AggregateRating">
    RATING: <span itemprop="ratingValue">4.6</span> (
    <span itemprop="ratingCount">8864</span> ratings )
  </div>
  <div itemprop="offers" itemscope itemtype="https://schema.org/Offer">
    Price: $<span itemprop="price">1.00</span>
    <meta itemprop="priceCurrency" content="USD" />
  </div>
</div>

This creates a structured item with nested rating and offer information that search engines can display as rich results.

Microdata vs. RDFa and microformats

Microdata serves the same goal as RDFa and classic microformats (annotating HTML with machine-readable data), but takes a declarative approach that many find simpler to implement.

Feature Microdata RDFa Microformats
Syntax HTML5 attributes only HTML5 attributes with XML namespaces Class attributes with specific strings
Vocabulary Schema.org (flexible, URL-based) Various (RDF-based) Predefined patterns (hCard, hReview)
Extension Supports custom vocabularies via URL Highly extensible Limited to existing patterns
Search support Google, Microsoft, Yahoo, Yandex Supported but complex Provides patterns like hCard, hRecipe, hReview

Rule of thumb: Use microdata for new implementations targeting modern search engines with Schema.org markup.

FAQ

What is the difference between microdata and microformats? Microdata uses HTML5 attributes like itemscope and itemtype with flexible URL-based vocabularies, while microformats rely on predefined strings in class attributes (like hCard for contact information or hReview for market reviews). [Yandex supports microformats for specific types] (MDN), but Schema.org microdata offers broader search engine compatibility.

Can I use custom vocabularies with microdata? Yes. [Web developers can design a custom vocabulary] (MDN) by using a custom URL as your itemtype. However, custom vocabularies receive less support from search engines than standard Schema.org types, so only use them when existing vocabularies cannot describe your content.

How do I mark up content that appears in multiple places on the page? Use the itemref attribute. Properties that are not descendants of an element with the itemscope attribute can be associated with the item using itemref, which provides a list of element IDs (not itemids) with additional properties elsewhere in the document.

Does microdata work with non-Schema.org vocabularies? Yes. While Schema.org is the standard supported by major search engines, microdata works with any vocabulary URL you specify in itemtype. The system simply uses the vocabulary to provide semantics for the Item you create with itemscope.

Why does Yandex have different microdata support? Yandex extends Schema.org to solve transliteration problems between Cyrillic and Latin alphabets. [Due to the implementation of these additional marking parameters, the indexation of information in Russian-language web-pages became considerably more successful] (MDN). For Russian markets, consider implementing these specific extensions alongside standard Schema.org markup.

What is itemref used for? The itemref attribute lets you include properties in your structured data that are not nested inside the main itemscope element. This is useful when your HTML structure separates related information visually or logically, but you want search engines to understand them as part of the same item.

Start Your SEO Research in Seconds

5 free searches/day • No credit card needed • Access all features