What Is Schema Markup? β Definition and How It Works
Learn what schema.org markup declares, the three formats, which types matter, and why it is the cleanest data source on many pages.
Schema markup is structured data added to a page describing what it is about, using a shared vocabulary so that machines interpret the fields consistently across sites.
1. The Three Formats
| Format | Placement | Notes |
|---|---|---|
| JSON-LD | A script tag | Recommended; separate from the markup |
| Microdata | Attributes on HTML elements | Interleaved with content |
| RDFa | Attributes on HTML elements | Similar, less common on the open web |
JSON-LD dominates because it sits apart from the presentation markup, so a redesign does not disturb it.
2. What It Looks Like
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Product",
"name": "Widget",
"sku": "A-4192",
"offers": {
"@type": "Offer",
"price": "49.90",
"priceCurrency": "USD",
"availability": "https://schema.org/InStock"
},
"aggregateRating": { "@type": "AggregateRating", "ratingValue": "4.6", "reviewCount": 128 }
}
</script>
3. The Types That Matter Most
- Product with offers, price, availability, and ratings.
- Article and NewsArticle with author and publication date.
- Organization and LocalBusiness with address and contact details.
- BreadcrumbList, describing site hierarchy.
- FAQPage and HowTo, describing structured content.
- Event, with dates, location, and availability.
- Recipe, with ingredients and timings.
4. Why Sites Maintain It
Because it drives rich results β the enhanced presentations in search that show ratings, prices, and other attributes directly.
That incentive is what makes it valuable to everyone else: publishers keep it accurate because search features depend on it, so it is maintained rather than incidental.
5. Why It Is the Best Extraction Target
| Source | Stability |
|---|---|
| Schema markup | High β a contract maintained for search |
| Embedded state | High β a data contract for the page's own code |
| Rendered markup | Low β changes with every redesign |
Reading a page's JSON-LD frequently yields the same fields a selector-based extractor would produce, without the maintenance burden of selectors.
6. Caveats
- It can be wrong, and sometimes disagrees with the visible page.
- It can be partial, describing only some of what is shown.
- Invalid JSON occurs, especially with unescaped characters.
- It may be injected by scripts, so a plain fetch might not contain it.
- Several blocks per page are normal β organisation, breadcrumb, and product together.
Validate what you extract rather than trusting it, and filter by @type for the entity you want.
7. Publishing It Well
Describe what is genuinely on the page, keep it synchronised with the visible content, use documented types and required properties, and validate with a structured-data testing tool.
Markup that contradicts the page is a policy violation rather than an optimisation, and it can cost the rich results it was added to earn.
8. Summary
Schema markup describes a page's subject using a shared vocabulary, usually as JSON-LD in a script tag, and drives rich results in search.
That incentive keeps it accurate, which makes it the most stable extraction target on many pages β a maintained data contract rather than incidental markup β provided it is validated rather than trusted.