Deutsch

Microdata is a syntax from the HTML standard for marking up content as structured data directly in the visible HTML. This entry covers the markup format, not microdata in statistics (individual survey records). Search engines read the type and properties of a piece of content from it, such as a product or an article.

How does Microdata work?

The HTML standard defines five attributes. itemscope creates an item, a group of name-value pairs. itemtype gives its type as a URL, usually a schema.org type. itemprop names a property. itemid can give an item a global identifier, and itemref links properties that sit outside the item’s own element.

Google supports Microdata, JSON-LD, and RDFa and recommends JSON-LD. Google accepts all three as long as they are implemented correctly and says to use the format that is easiest for you to implement and maintain.

Example

HTML
<div itemscope itemtype="https://schema.org/Product">
  <h1 itemprop="name">Hiking backpack 30 L</h1>
  <div itemprop="offers" itemscope itemtype="https://schema.org/Offer">
    <span itemprop="price" content="89.90">$89.90</span>
    <meta itemprop="priceCurrency" content="USD">
  </div>
</div>

The data is attached to the visible text. When a template changes the content, the markup changes with it.

Microdata or JSON-LD?

JSON-LD keeps all markup in one script block. Microdata spreads it across the HTML and ties it to the template, which makes it easier to break during redesigns (assessment). Existing Microdata does not have to be replaced as long as a test such as the Rich Results Test reads it without errors.

Structured data formats compared
FormatWhere does the markup go?Relation to visible contentGoogle's position
JSON-LDin a <script type="application/ld+json"> in the <head> or <body>separate from the visible text; nested data is easy to expressrecommended as easiest to implement and maintain at scale, less prone to user errors; also read when injected with JavaScript
Microdata (this term)as attributes on HTML elements, usually in the <body>, also possible in the <head>nested within the HTML contentsupported; equally fine for Google as long as the markup is valid and implemented per the documentation
RDFaas attributes on HTML elements, in the <head> and <body>attributes on elements with user-visible contentsupported; equally fine for Google as long as the markup is valid and implemented per the documentation

All three formats are syntaxes for the same vocabulary: according to schema.org, its types and properties can be expressed in Microdata, RDFa and JSON-LD. Google supports all three unless the documentation for a specific feature says otherwise. Google recommends JSON-LD but calls all three formats equally fine as long as the markup is valid. Sources: Google Search Central: Introduction to structured data markup in Google Search (last updated 2025-12-10); schema.org: Data model. Last checked: .

Common mistakes

  • Markup for content nobody sees. Google requires marked-up content to be visible to readers of the page. Hidden content can mean that no rich result is shown.
  • Missing required properties. Items without all required properties of their type are not eligible for rich results.
  • Markup that does not match the page. Google names irrelevant or misleading markup as a violation, for example instructions labeled as recipes.

FAQ

What is the difference between JSON-LD and Microdata? Both describe content with schema.org vocabulary. JSON-LD sits in a separate script element, Microdata uses attributes inside the visible HTML.

Sources

  1. HTML Standard - Microdata (WHATWG)html.spec.whatwg.org
  2. Introduction to structured data markup - Google Search Centraldevelopers.google.com
  3. Getting started with schema.org using Microdataschema.org
  4. General structured data guidelines – Google Search Centraldevelopers.google.com

Last updated: