JSON-LD Structured Data Basics
Add machine-readable structured data with JSON-LD.
What is Structured Data?
Structured data is machine-readable JSON describing what the page is about — an article, a recipe, a product, an event. Search engines use it to render rich results (star ratings, recipe cards, breadcrumbs) instead of plain blue links.
JSON-LD is the Recommended Format
Google's preferred format is JSON-LD: a single <script type="application/ld+json"> block in the head or body containing one or more schema.org objects. It is decoupled from the visible HTML, so adding or updating it requires no template rewrite.
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Article",
"headline": "Learn HTML",
"author": { "@type": "Person", "name": "Ada Lovelace" },
"datePublished": "2024-05-01"
}
</script>All lessons in this course
- OpenGraph og:title og:description og:image
- Twitter Card Meta Tags
- JSON-LD Structured Data Basics
- Hreflang for International Pages