Microdata & Schema.org
Master structured data markup to enhance search engine understanding and create rich snippets. Learn Schema.org vocabulary, microdata attributes, and JSON-LD implementation.
What is structured data in HTML?
Structured data describes your content in a machine-readable vocabulary (Schema.org) so search engines understand exactly what it is: an article, product, recipe, event or breadcrumb trail. Google recommends the JSON-LD format, a <script type="application/ld+json"> block. Microdata (itemscope, itemprop) is an older inline alternative.
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "BreadcrumbList",
"itemListElement": [
{ "@type": "ListItem", "position": 1, "name": "Tutorials", "item": "https://example.com/tutorials" },
{ "@type": "ListItem", "position": 2, "name": "HTML", "item": "https://example.com/tutorials/html" }
]
}
</script>Structured Data Fundamentals
Microdata and Schema.org provide a standardized way to embed structured data in HTML, helping search engines understand your content and display rich snippets in search results.
SEO
Rich snippets
Schema
Vocabulary
Entities
Data types
Results
Enhanced display
Common Schema Types
👤 Person & Organization
- • Person - Individual profiles
- • Organization - Companies, nonprofits
- • LocalBusiness - Physical locations
- • ContactPoint - Contact information
- • PostalAddress - Address details
🛍️ Commerce & Products
- • Product - Items for sale
- • Offer - Pricing and availability
- • Review - Customer feedback
- • AggregateRating - Average ratings
- • Brand - Product brands
📅 Events & Content
- • Event - Conferences, concerts
- • Article - Blog posts, news
- • Recipe - Cooking instructions
- • HowTo - Step-by-step guides
- • FAQ - Question answers
Complete Microdata Implementation
Explore comprehensive microdata markup for various schema types with practical examples:
Complete microdata implementation with Schema.org vocabulary and rich snippet optimization:
Code Editor
<!-- JSON-LD: Google's recommended structured data format -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Course",
"name": "HTML for Beginners",
"provider": { "@type": "Organization", "name": "Compileum" }
}
</script>
<!-- Microdata: the same idea, written as attributes -->
<div itemscope itemtype="https://schema.org/Person">
<span itemprop="name">Ada Lovelace</span>,
<span itemprop="jobTitle">Mathematician</span>
</div>
<pre id="out"></pre>Preview
🎯 Schema Features:
- • Person and organization markup
- • Product catalog with reviews
- • Event information with location
- • Recipe structured data
- • Local business details
- • JSON-LD alternative format
📊 Rich Snippet Benefits:
- • Enhanced search result display
- • Star ratings and review counts
- • Price and availability info
- • Event dates and locations
- • Recipe cooking times
- • Business hours and contact
Implementation Methods
🏷️ Microdata
- • itemscope - Defines container
- • itemtype - Schema type
- • itemprop - Property name
- • itemref - Reference other elements
- • Embedded in HTML content
📋 JSON-LD
- • Separate script blocks
- • Cleaner HTML markup
- • Easier maintenance
- • Better for dynamic content
- • Google's preferred format
🧪 Testing Tools
- • Google Rich Results Test
- • Schema.org Validator
- • Search Console monitoring
- • Structured Data Helper
- • Browser extensions
HTML Microdata — step by step
Understand what microdata does
Microdata adds machine-readable annotations to your HTML content using itemscope, itemtype, and itemprop attributes. Search engines use this structured data to understand and display your content in rich results.
🎯 Quick Check
Which attribute in microdata marks the start of an item's scope?
HTML Microdata and Structured Data: summary
Key points
- Structured data can make pages eligible for rich results, such as breadcrumbs, product stars or recipe cards.
- Only mark up content that's actually visible on the page.
- Test with Google's Rich Results Test and the Schema Markup Validator.
Frequently asked questions
›Should I use JSON-LD or Microdata?
JSON-LD. It's Google's recommended format and keeps the markup separate from your HTML, which makes it easier to maintain.
›Does structured data improve rankings?
Not directly. It helps Google understand the page and can earn rich results, which can increase click-through rate.