Microdata & Schema
Microdata is an HTML specification that allows you to nest machine-readable metadata within your content using a set of attributes. Combined with Schema.org vocabulary, microdata enables search engines, social platforms, and other consumers to understand your content's meaning — not just its presentation.
When Google, Bing, Yahoo, and Yandex introduced Schema.org in 2011, they created a shared vocabulary for structured data on the web. Microdata is one of three syntaxes for embedding this vocabulary in HTML (alongside JSON-LD and RDFa). While JSON-LD has become the preferred syntax for most use cases, microdata remains widely supported and is particularly valuable when you want to annotate existing visible content inline.
Rich snippets powered by microdata can significantly improve your search result appearance — star ratings, product prices, recipe cook times, FAQ accordions, and breadcrumb trails all render directly in search engine result pages (SERPs). This increased visibility can improve click-through rates by 20-30%.
The itemscope attribute creates a new structured data item. The itemtype attribute specifies the Schema.org type URL that defines the item's vocabulary. Together, they declare that an HTML element and its children describe a specific type of thing — an Article, a Product, a Person, an Event, etc.
| 1 | <!-- Basic itemscope + itemtype declaration --> |
| 2 | <div itemscope itemtype="https://schema.org/Article"> |
| 3 | <!-- This div and its contents describe an Article --> |
| 4 | </div> |
| 5 | |
| 6 | <!-- Every itemtype must be a full Schema.org URL --> |
| 7 | <div itemscope itemtype="https://schema.org/Product"> |
| 8 | <!-- Product properties go here --> |
| 9 | </div> |
| 10 | |
| 11 | <!-- The itemscope can be on any HTML element --> |
| 12 | <article itemscope itemtype="https://schema.org/BlogPosting"> |
| 13 | <h1 itemprop="headline">Blog title</h1> |
| 14 | </article> |
| Attribute | Purpose | Required |
|---|---|---|
| itemscope | Creates a new structured data item (a scope boundary) | Yes — to define an item |
| itemtype | URL of the Schema.org type (e.g., https://schema.org/Product) | Recommended |
| itemprop | Specifies a property of the item (maps to Schema.org property) | Per property |
| itemid | Globally unique identifier for the item (URL or CID) | Optional |
| itemref | References properties defined outside the itemscope element | Optional |
info
The itemprop attribute assigns a property to the current item. The property name must match a property defined by the item's Schema.org type. The value is determined by the element's content or specific attributes:
| Element | Attribute Used as Value | Example |
|---|---|---|
| <a> | href | <a itemprop="url" href="/page"> |
| <img> | src | <img itemprop="image" src="photo.jpg" /> |
| <meta> | content | <meta itemprop="date" content="2026-01-15" /> |
| <link> | href | <link itemprop="sameAs" href="https://twitter.com/..." /> |
| <time> | datetime | <time itemprop="datePublished" datetime="2026-01-15"> |
| Other elements | Text content | <span itemprop="name">Product Name</span> |
| 1 | <article itemscope itemtype="https://schema.org/Article"> |
| 2 | <!-- itemprop on elements provides the value --> |
| 3 | <h1 itemprop="headline">Understanding Microdata</h1> |
| 4 | |
| 5 | <!-- <meta> for non-visible properties --> |
| 6 | <meta itemprop="datePublished" content="2026-01-15" /> |
| 7 | <meta itemprop="author" content="Jane Doe" /> |
| 8 | |
| 9 | <!-- <img> uses src as value --> |
| 10 | <img itemprop="image" src="article-banner.jpg" alt="Microdata guide" /> |
| 11 | |
| 12 | <!-- <time> uses datetime attribute --> |
| 13 | <p>Published on <time itemprop="dateModified" datetime="2026-02-01"> |
| 14 | February 1, 2026</time> |
| 15 | </p> |
| 16 | |
| 17 | <!-- <a> uses href --> |
| 18 | <a itemprop="url" href="/articles/microdata">Permalink</a> |
| 19 | |
| 20 | <!-- Regular elements use text content --> |
| 21 | <p itemprop="description">A comprehensive guide to using |
| 22 | microdata and Schema.org for better search results.</p> |
| 23 | </article> |
best practice
The itemid attribute assigns a globally unique identifier to an item, enabling cross-referencing and deduplication. The itemref attribute allows an item to reference properties defined on other elements outside its itemscope boundary.
| 1 | <!-- itemid: unique identifier for the item --> |
| 2 | <div itemscope |
| 3 | itemtype="https://schema.org/Product" |
| 4 | itemid="urn:isbn:978-0-123-45678-9"> |
| 5 | <span itemprop="name">Microdata Handbook</span> |
| 6 | <span itemprop="isbn">978-0-123-45678-9</span> |
| 7 | </div> |
| 8 | |
| 9 | <!-- itemref: reference properties from outside --> |
| 10 | <div itemscope |
| 11 | itemtype="https://schema.org/Person" |
| 12 | itemref="contact-info bio-section"> |
| 13 | <span itemprop="name">John Smith</span> |
| 14 | </div> |
| 15 | |
| 16 | <!-- Referenced sections (can be anywhere in the document) --> |
| 17 | <div id="contact-info"> |
| 18 | <span itemprop="email">john@example.com</span> |
| 19 | <span itemprop="telephone">+1-555-0123</span> |
| 20 | </div> |
| 21 | |
| 22 | <div id="bio-section"> |
| 23 | <span itemprop="description">Software engineer and author.</span> |
| 24 | </div> |
info
Schema.org defines hundreds of types. These are the most commonly used for rich search results, with complete microdata examples.
Article
Used for news articles, blog posts, and other written content. Generates headline, author, and publish date in search results.
| 1 | <article itemscope itemtype="https://schema.org/Article"> |
| 2 | <meta itemprop="mainEntityOfPage" content="https://example.com/article" /> |
| 3 | <h1 itemprop="headline">How to Use Microdata for SEO</h1> |
| 4 | <p itemprop="description">Learn how structured data improves |
| 5 | your search appearance.</p> |
| 6 | <meta itemprop="datePublished" content="2026-01-15T09:00:00Z" /> |
| 7 | <meta itemprop="dateModified" content="2026-02-01T14:30:00Z" /> |
| 8 | <div itemprop="author" itemscope itemtype="https://schema.org/Person"> |
| 9 | <span itemprop="name">Jane Doe</span> |
| 10 | <link itemprop="url" href="https://example.com/authors/jane" /> |
| 11 | </div> |
| 12 | <div itemprop="publisher" itemscope itemtype="https://schema.org/Organization"> |
| 13 | <span itemprop="name">Example Publishing</span> |
| 14 | <link itemprop="url" href="https://example.com" /> |
| 15 | </div> |
| 16 | <img itemprop="image" src="article-banner.jpg" alt="Article banner" /> |
| 17 | </article> |
Product
Used for e-commerce products. Generates price, availability, rating, and review stars in search results.
| 1 | <div itemscope itemtype="https://schema.org/Product"> |
| 2 | <img itemprop="image" src="headphones.jpg" alt="Wireless Headphones" /> |
| 3 | <h2 itemprop="name">Noise-Cancelling Wireless Headphones</h2> |
| 4 | <span itemprop="sku" content="NC-WH-2026">SKU: NC-WH-2026</span> |
| 5 | <p itemprop="description">Premium noise-cancelling headphones |
| 6 | with 30-hour battery life and Bluetooth 5.3.</p> |
| 7 | |
| 8 | <div itemprop="brand" itemscope itemtype="https://schema.org/Brand"> |
| 9 | <span itemprop="name">SoundPro</span> |
| 10 | </div> |
| 11 | |
| 12 | <div itemprop="offers" itemscope itemtype="https://schema.org/Offer"> |
| 13 | <span itemprop="priceCurrency" content="USD">$</span> |
| 14 | <span itemprop="price">149.99</span> |
| 15 | <link itemprop="availability" href="https://schema.org/InStock" /> |
| 16 | <meta itemprop="priceValidUntil" content="2026-12-31" /> |
| 17 | <link itemprop="url" href="https://example.com/product/nc-wh-2026" /> |
| 18 | </div> |
| 19 | |
| 20 | <div itemprop="aggregateRating" itemscope |
| 21 | itemtype="https://schema.org/AggregateRating"> |
| 22 | <span itemprop="ratingValue">4.7</span> out of 5 |
| 23 | (<span itemprop="reviewCount">312</span> reviews) |
| 24 | </div> |
| 25 | |
| 26 | <div itemprop="review" itemscope itemtype="https://schema.org/Review"> |
| 27 | <span itemprop="reviewRating" itemscope |
| 28 | itemtype="https://schema.org/Rating"> |
| 29 | <meta itemprop="ratingValue" content="5" /> |
| 30 | </span> |
| 31 | <span itemprop="author" itemscope itemtype="https://schema.org/Person"> |
| 32 | <span itemprop="name">Alex K.</span> |
| 33 | </span> |
| 34 | <p itemprop="reviewBody">Best headphones I have ever used!</p> |
| 35 | </div> |
| 36 | </div> |
Person & Organization
Used for people and organizations. Generates knowledge graph entries, author info, and social profile links.
| 1 | <!-- Person --> |
| 2 | <div itemscope itemtype="https://schema.org/Person"> |
| 3 | <span itemprop="name">Jane Doe</span> |
| 4 | <img itemprop="image" src="jane.jpg" alt="Jane Doe" /> |
| 5 | <span itemprop="jobTitle">Senior Software Engineer</span> |
| 6 | <span itemprop="affiliation" itemscope |
| 7 | itemtype="https://schema.org/Organization"> |
| 8 | <span itemprop="name">TechCorp</span> |
| 9 | </span> |
| 10 | <link itemprop="sameAs" href="https://twitter.com/janedoe" /> |
| 11 | <link itemprop="sameAs" href="https://github.com/janedoe" /> |
| 12 | <link itemprop="sameAs" href="https://linkedin.com/in/janedoe" /> |
| 13 | <link itemprop="url" href="https://example.com/authors/jane" /> |
| 14 | </div> |
| 15 | |
| 16 | <!-- Organization --> |
| 17 | <div itemscope itemtype="https://schema.org/Organization"> |
| 18 | <span itemprop="name">TechCorp Inc.</span> |
| 19 | <img itemprop="logo" src="logo.png" alt="TechCorp" /> |
| 20 | <link itemprop="url" href="https://techcorp.com" /> |
| 21 | <div itemprop="address" itemscope itemtype="https://schema.org/PostalAddress"> |
| 22 | <span itemprop="streetAddress">123 Tech Street</span> |
| 23 | <span itemprop="addressLocality">San Francisco</span> |
| 24 | <span itemprop="addressRegion">CA</span> |
| 25 | <span itemprop="postalCode">94105</span> |
| 26 | <span itemprop="addressCountry">US</span> |
| 27 | </div> |
| 28 | <span itemprop="telephone">+1-555-0100</span> |
| 29 | <link itemprop="sameAs" href="https://twitter.com/techcorp" /> |
| 30 | <link itemprop="sameAs" href="https://linkedin.com/company/techcorp" /> |
| 31 | </div> |
Event
Used for events. Generates date, time, location, and ticket information in search results.
| 1 | <div itemscope itemtype="https://schema.org/Event"> |
| 2 | <meta itemprop="eventStatus" content="https://schema.org/EventScheduled" /> |
| 3 | <meta itemprop="eventAttendanceMode" |
| 4 | content="https://schema.org/OfflineEventAttendanceMode" /> |
| 5 | <h1 itemprop="name">Web Components Conference 2026</h1> |
| 6 | <p itemprop="description">A two-day conference on Web Components |
| 7 | and modern frontend architecture.</p> |
| 8 | |
| 9 | <time itemprop="startDate" datetime="2026-06-15T09:00:00Z"> |
| 10 | June 15, 2026, 9:00 AM |
| 11 | </time> |
| 12 | <time itemprop="endDate" datetime="2026-06-16T18:00:00Z"> |
| 13 | June 16, 2026, 6:00 PM |
| 14 | </time> |
| 15 | |
| 16 | <div itemprop="location" itemscope itemtype="https://schema.org/Place"> |
| 17 | <span itemprop="name">Moscone Center</span> |
| 18 | <div itemprop="address" itemscope itemtype="https://schema.org/PostalAddress"> |
| 19 | <span itemprop="streetAddress">747 Howard St</span> |
| 20 | <span itemprop="addressLocality">San Francisco</span> |
| 21 | <span itemprop="addressRegion">CA</span> |
| 22 | <span itemprop="postalCode">94103</span> |
| 23 | </div> |
| 24 | </div> |
| 25 | |
| 26 | <div itemprop="offers" itemscope itemtype="https://schema.org/Offer"> |
| 27 | <span itemprop="priceCurrency" content="USD">$</span> |
| 28 | <span itemprop="price">299</span> |
| 29 | <link itemprop="availability" href="https://schema.org/InStock" /> |
| 30 | <link itemprop="url" href="https://example.com/register" /> |
| 31 | </div> |
| 32 | |
| 33 | <div itemprop="organizer" itemscope itemtype="https://schema.org/Organization"> |
| 34 | <span itemprop="name">WebDev Society</span> |
| 35 | </div> |
| 36 | </div> |
Recipe
Used for recipes. Generates cook time, calories, ingredients, and star ratings directly in search results.
| 1 | <div itemscope itemtype="https://schema.org/Recipe"> |
| 2 | <h1 itemprop="name">Classic Chocolate Chip Cookies</h1> |
| 3 | <img itemprop="image" src="cookies.jpg" alt="Finished cookies" /> |
| 4 | <p itemprop="description">Soft and chewy chocolate chip cookies |
| 5 | with a golden brown edge.</p> |
| 6 | <meta itemprop="prepTime" content="PT15M" /> |
| 7 | <meta itemprop="cookTime" content="PT12M" /> |
| 8 | <span itemprop="totalTime">Total: 27 minutes</span> |
| 9 | <span itemprop="recipeYield">Makes: 24 cookies</span> |
| 10 | <span itemprop="recipeCategory">Dessert</span> |
| 11 | <span itemprop="recipeCuisine">American</span> |
| 12 | |
| 13 | <span itemprop="nutrition" itemscope |
| 14 | itemtype="https://schema.org/NutritionInformation"> |
| 15 | <meta itemprop="calories" content="180" /> |
| 16 | </span> |
| 17 | |
| 18 | <h3>Ingredients</h3> |
| 19 | <ul> |
| 20 | <li itemprop="recipeIngredient">2 1/4 cups all-purpose flour</li> |
| 21 | <li itemprop="recipeIngredient">1 cup butter, softened</li> |
| 22 | <li itemprop="recipeIngredient">3/4 cup granulated sugar</li> |
| 23 | <li itemprop="recipeIngredient">3/4 cup brown sugar</li> |
| 24 | <li itemprop="recipeIngredient">2 large eggs</li> |
| 25 | <li itemprop="recipeIngredient">2 cups chocolate chips</li> |
| 26 | </ul> |
| 27 | |
| 28 | <h3>Instructions</h3> |
| 29 | <ol> |
| 30 | <li itemprop="recipeInstructions">Preheat oven to 375°F (190°C).</li> |
| 31 | <li itemprop="recipeInstructions">Cream butter and sugars together.</li> |
| 32 | <li itemprop="recipeInstructions">Add eggs and vanilla, mix well.</li> |
| 33 | <li itemprop="recipeInstructions">Combine dry ingredients, gradually add.</li> |
| 34 | <li itemprop="recipeInstructions">Fold in chocolate chips.</li> |
| 35 | <li itemprop="recipeInstructions">Bake for 9-12 minutes until golden.</li> |
| 36 | </ol> |
| 37 | </div> |
FAQ
Used for FAQ pages. Generates an interactive accordion in search results. Note: each question must be visible on the page.
| 1 | <div itemscope itemtype="https://schema.org/FAQPage"> |
| 2 | <h1>Frequently Asked Questions</h1> |
| 3 | |
| 4 | <div itemscope itemprop="mainEntity" |
| 5 | itemtype="https://schema.org/Question"> |
| 6 | <h2 itemprop="name">What is microdata?</h2> |
| 7 | <div itemscope itemprop="acceptedAnswer" |
| 8 | itemtype="https://schema.org/Answer"> |
| 9 | <div itemprop="text">Microdata is an HTML specification |
| 10 | for embedding machine-readable metadata in web pages.</div> |
| 11 | </div> |
| 12 | </div> |
| 13 | |
| 14 | <div itemscope itemprop="mainEntity" |
| 15 | itemtype="https://schema.org/Question"> |
| 16 | <h2 itemprop="name">Do I need JSON-LD or microdata?</h2> |
| 17 | <div itemscope itemprop="acceptedAnswer" |
| 18 | itemtype="https://schema.org/Answer"> |
| 19 | <div itemprop="text">Both work. JSON-LD is easier to maintain |
| 20 | and is Google's recommended format for most use cases.</div> |
| 21 | </div> |
| 22 | </div> |
| 23 | </div> |
BreadcrumbList
Used for breadcrumb navigation. Generates breadcrumb trail in search results, helping users understand your site structure.
| 1 | <nav aria-label="Breadcrumb" |
| 2 | itemscope itemtype="https://schema.org/BreadcrumbList"> |
| 3 | <ol> |
| 4 | <li itemprop="itemListElement" |
| 5 | itemscope itemtype="https://schema.org/ListItem"> |
| 6 | <a itemprop="item" href="/"> |
| 7 | <span itemprop="name">Home</span> |
| 8 | </a> |
| 9 | <meta itemprop="position" content="1" /> |
| 10 | </li> |
| 11 | <li itemprop="itemListElement" |
| 12 | itemscope itemtype="https://schema.org/ListItem"> |
| 13 | <a itemprop="item" href="/docs"> |
| 14 | <span itemprop="name">Documentation</span> |
| 15 | </a> |
| 16 | <meta itemprop="position" content="2" /> |
| 17 | </li> |
| 18 | <li itemprop="itemListElement" |
| 19 | itemscope itemtype="https://schema.org/ListItem"> |
| 20 | <span itemprop="name">HTML Microdata</span> |
| 21 | <meta itemprop="position" content="3" /> |
| 22 | <meta itemprop="item" content="https://example.com/docs/html/microdata" /> |
| 23 | </li> |
| 24 | </ol> |
| 25 | </nav> |
HowTo
Used for step-by-step instructions. Generates expandable how-to results with step images in search.
| 1 | <div itemscope itemtype="https://schema.org/HowTo"> |
| 2 | <h1 itemprop="name">Change a Flat Tire</h1> |
| 3 | <p itemprop="description">Step-by-step guide to safely |
| 4 | changing a flat tire on your car.</p> |
| 5 | <meta itemprop="totalTime" content="PT30M" /> |
| 6 | <meta itemprop="estimatedCost" content="0" /> |
| 7 | |
| 8 | <h3>Tools needed:</h3> |
| 9 | <div itemprop="tool" itemscope itemtype="https://schema.org/HowToTool"> |
| 10 | <span itemprop="name">Car jack</span> |
| 11 | </div> |
| 12 | <div itemprop="tool" itemscope itemtype="https://schema.org/HowToTool"> |
| 13 | <span itemprop="name">Lug wrench</span> |
| 14 | </div> |
| 15 | <div itemprop="tool" itemscope itemtype="https://schema.org/HowToTool"> |
| 16 | <span itemprop="name">Spare tire</span> |
| 17 | </div> |
| 18 | |
| 19 | <h3>Instructions:</h3> |
| 20 | <ol> |
| 21 | <li itemprop="step" itemscope itemtype="https://schema.org/HowToStep"> |
| 22 | <span itemprop="position">1</span> |
| 23 | <div itemprop="text">Find a safe, level surface and park.</div> |
| 24 | </li> |
| 25 | <li itemprop="step" itemscope itemtype="https://schema.org/HowToStep"> |
| 26 | <span itemprop="position">2</span> |
| 27 | <div itemprop="text">Loosen the lug nuts with the wrench.</div> |
| 28 | </li> |
| 29 | <li itemprop="step" itemscope itemtype="https://schema.org/HowToStep"> |
| 30 | <span itemprop="position">3</span> |
| 31 | <div itemprop="text">Jack up the car until the tire clears ground.</div> |
| 32 | </li> |
| 33 | <li itemprop="step" itemscope itemtype="https://schema.org/HowToStep"> |
| 34 | <span itemprop="position">4</span> |
| 35 | <div itemprop="text">Remove the flat tire and mount the spare.</div> |
| 36 | </li> |
| 37 | <li itemprop="step" itemscope itemtype="https://schema.org/HowToStep"> |
| 38 | <span itemprop="position">5</span> |
| 39 | <div itemprop="text">Tighten lug nuts, lower the car, and torque.</div> |
| 40 | </li> |
| 41 | </ol> |
| 42 | </div> |
best practice
Microdata supports nested items — an itemprop can itself have itemscope. This creates hierarchical structures where a property value is itself a typed entity. This is essential for complex schemas like Product (which has an Offer, Brand, and AggregateRating) or Article (which has an Author and Publisher).
| 1 | <!-- Deep nesting: Article > Author (Person) > Affiliation (Organization) --> |
| 2 | <article itemscope itemtype="https://schema.org/Article"> |
| 3 | <h1 itemprop="headline">Deep Dive into Microdata Nesting</h1> |
| 4 | <meta itemprop="datePublished" content="2026-01-20" /> |
| 5 | |
| 6 | <!-- Author is a Person (nested item) --> |
| 7 | <div itemprop="author" itemscope itemtype="https://schema.org/Person"> |
| 8 | <span itemprop="name">John Smith</span> |
| 9 | <span itemprop="jobTitle">Technical Writer</span> |
| 10 | |
| 11 | <!-- Affiliation is an Organization (double-nested) --> |
| 12 | <div itemprop="affiliation" |
| 13 | itemscope itemtype="https://schema.org/Organization"> |
| 14 | <span itemprop="name">WebDocs Inc.</span> |
| 15 | <link itemprop="url" href="https://webdocs.example.com" /> |
| 16 | </div> |
| 17 | |
| 18 | <!-- Multiple sameAs links --> |
| 19 | <link itemprop="sameAs" href="https://twitter.com/johnsmith" /> |
| 20 | <link itemprop="sameAs" href="https://github.com/johnsmith" /> |
| 21 | </div> |
| 22 | |
| 23 | <!-- Publisher is a separate Organization --> |
| 24 | <div itemprop="publisher" itemscope itemtype="https://schema.org/Organization"> |
| 25 | <span itemprop="name">Example Media</span> |
| 26 | <img itemprop="logo" src="logo.png" alt="Example Media" /> |
| 27 | </div> |
| 28 | </article> |
| 29 | |
| 30 | <!-- Equivalent JSON-LD representation: |
| 31 | { |
| 32 | "@context": "https://schema.org", |
| 33 | "@type": "Article", |
| 34 | "headline": "Deep Dive into Microdata Nesting", |
| 35 | "datePublished": "2026-01-20", |
| 36 | "author": { |
| 37 | "@type": "Person", |
| 38 | "name": "John Smith", |
| 39 | "jobTitle": "Technical Writer", |
| 40 | "affiliation": { |
| 41 | "@type": "Organization", |
| 42 | "name": "WebDocs Inc.", |
| 43 | "url": "https://webdocs.example.com" |
| 44 | }, |
| 45 | "sameAs": [ |
| 46 | "https://twitter.com/johnsmith", |
| 47 | "https://github.com/johnsmith" |
| 48 | ] |
| 49 | }, |
| 50 | "publisher": { |
| 51 | "@type": "Organization", |
| 52 | "name": "Example Media", |
| 53 | "logo": "https://example.com/logo.png" |
| 54 | } |
| 55 | } |
| 56 | --> |
warning
Always test your structured data before deploying. These tools validate your markup against the Schema.org vocabulary and show how Google will render your rich result.
Google Rich Results Test
Tests your page URL or code snippet for supported rich result types (products, recipes, jobs, events, FAQ, etc.). Shows preview of how your result will appear in search. Available at search.google.com/test/rich-results.
Schema.org Validator
The official Schema.org validator at validator.schema.org. Validates all schema types and properties, shows extracted triples, and detects errors. Supports URL input and code snippets.
Google Search Console
Once deployed, monitor your structured data in Google Search Console under the "Enhancements" section. It shows which pages have valid structured data, which have errors, and any manual actions. Also provides reports on rich result performance.
Bing Webmaster Tools
Bing's Webmaster Tools provides structured data validation and reporting for Bing search results. Supports the same Schema.org vocabulary as Google.
info
Schema.org data can be embedded in HTML using three syntaxes. Each has trade-offs in terms of maintainability, readability, and integration with existing content.
| Feature | JSON-LD | Microdata | RDFa |
|---|---|---|---|
| Syntax | JSON block in <script> tag | HTML attributes on visible elements | HTML attributes (more verbose) |
| Separation from content | Complete | Inline with content | Inline with content |
| Ease of maintenance | Easy — one block per page | Moderate — scattered in markup | Hard — verbose attributes |
| Google recommendation | Preferred | Supported | Supported |
| Dynamic generation | Easy — server-side or JS | Moderate | Hard |
| Annotates visible content | No — separate block | Yes — inline semantics | Yes — inline semantics |
| CMS compatibility | Excellent — inject via head/footer | Moderate — needs template edits | Hard — heavy template changes |
| 1 | <!-- JSON-LD — Google's recommended syntax --> |
| 2 | <script type="application/ld+json"> |
| 3 | { |
| 4 | "@context": "https://schema.org", |
| 5 | "@type": "Product", |
| 6 | "name": "Wireless Headphones", |
| 7 | "offers": { |
| 8 | "@type": "Offer", |
| 9 | "price": "149.99", |
| 10 | "priceCurrency": "USD", |
| 11 | "availability": "https://schema.org/InStock" |
| 12 | } |
| 13 | } |
| 14 | </script> |
| 15 | |
| 16 | <!-- Microdata — inline with visible content --> |
| 17 | <div itemscope itemtype="https://schema.org/Product"> |
| 18 | <h2 itemprop="name">Wireless Headphones</h2> |
| 19 | <div itemprop="offers" itemscope itemtype="https://schema.org/Offer"> |
| 20 | <span itemprop="price">149.99</span> |
| 21 | </div> |
| 22 | </div> |
| 23 | |
| 24 | <!-- RDFa — more verbose attribute syntax --> |
| 25 | <div typeof="schema:Product" vocab="https://schema.org/"> |
| 26 | <h2 property="schema:name">Wireless Headphones</h2> |
| 27 | <div typeof="schema:Offer" property="schema:offers"> |
| 28 | <span property="schema:price">149.99</span> |
| 29 | </div> |
| 30 | </div> |
best practice
Structured data provides significant SEO advantages by enhancing how your content appears in search results. These enhancements, called rich results or rich snippets, make your listing more prominent and informative.
Rich Snippets
Enhanced search results that display additional information — star ratings, product prices, recipe cook times, event dates, FAQ accordions. These take more visual space in SERPs and have consistently higher click-through rates. Case studies show 20-40% CTR improvement for pages with rich snippets.
Knowledge Graph
Schema.org markup for Person and Organization contributes to the Google Knowledge Graph. When someone searches for your brand or name, the knowledge panel shows your logo, description, social profiles, and key facts derived from your structured data.
Voice Search & AI Assistants
Voice assistants (Google Assistant, Siri, Alexa) rely heavily on structured data to answer questions. A well-marked-up recipe can be read aloud step-by-step. A product with offers can be compared by price. Structured data makes your content accessible to non-visual interfaces.
Carousel & AMP Integration
Google can display your content in search carousels (e.g., "Top 10 recipes") when properly marked up with Schema.org. For AMP pages, structured data is required for many rich result types.
pro tip
warning