Lesson 41 of 55
HTMLMicrodata & Structured Data – Schema.org
10 min
Course progress75%
What you'll learn
Keep these ideas in mind as you work through the lesson.
Lesson 41 of 55
HTML10 min
Keep these ideas in mind as you work through the lesson.
Microdata lets you embed machine‑readable data directly in HTML using itemscope, itemtype, and itemprop.
<div itemscope itemtype='https://schema.org/Person'>
<h1 itemprop='name'>Jane Doe</h1>
<p>Web developer based in <span itemprop='address'>Seattle</span>.</p>
<a href='mailto:jane@example.com' itemprop='email'>jane@example.com</a>
</div>
itemscope – Declares a new entity (the start of a microdata block).itemtype – URL pointing to a Schema.org type (e.g., Person, Article, Product).itemprop – Property name of the entity; the text/value of the element becomes the property's value.<script type='application/ld+json'>
{
"@context": "https://schema.org",
"@type": "Person",
"name": "Jane Doe",
"url": "https://example.com",
"email": "mailto:jane@example.com",
"address": {
"@type": "PostalAddress",
"addressLocality": "Seattle",
"addressRegion": "WA"
}
}
</script>
JSON‑LD keeps your markup clean and is easier to maintain.
itemscope and itemtype used where appropriate? ✅itemprop names follow Schema.org vocabulary? ✅@type definitions that could confuse parsers? ✅Tip: Start with JSON‑LD for most use‑cases, and fall back to Microdata only when you need inline markup for a legacy CMS.