freecoding.school100% FREE · NO SIGNUP
Input HarborISSUE #39 of 46

structured data · json-ld · schema.org

FormaVSCaptain Invalid Input
Forma saysStructured data (JSON-LD via schema.org) describes your content to search engines for rich results.

A <script type="application/ld+json"> block describes the page as a typed thing — Article, Product, Recipe, Event — using the schema.org vocabulary. Search engines read it to build rich snippets: star ratings, prices, FAQ accordions, recipe cards.

JSON-LD is Google's preferred format because it's a self-contained block — no need to interleave attributes through your markup. Validate it with a structured-data testing tool before shipping.

Power-ups you unlock

Captain Invalid Input attacks — common mistakes

Boss battleAdd a JSON-LD block describing this page as an Article with a headline, author, and datePublished.

Example code

<!doctype html>
<html><head>
  <meta charset="utf-8"><title>structured data</title>
  <script type="application/ld+json">
  {
    "@context": "https://schema.org",
    "@type": "Article",
    "headline": "Learning Structured Data",
    "author": { "@type": "Person", "name": "the drewless" },
    "datePublished": "2026-05-28"
  }
  </script>
</head>
<body style="background:#06040d;color:#e6e0ff;padding:20px"><h1>Learning Structured Data</h1></body>
</html>
▶ Open the interactive comic issue
‹ Open Graph · How Social Cards RenderService Workers · The Offline Surface ›