Skip to content
Tutorials Center
My learning

Topics

Lesson 23 of 36 ยท Technical SEO

Structured Data and Schema Markup

Learn how structured data and schema.org JSON-LD help search engines understand pages, which types to use, rich results rules and how to validate markup in code.

Search engines read text well but they still have to guess what it means. Is "Jaguar" an animal or a car? Is "4.5" a rating or a version number? Structured data is extra markup that states these facts explicitly, using a shared vocabulary from schema.org.

Structured data does not directly raise rankings. Its value is that it helps engines understand a page and makes it eligible for rich results such as star ratings, recipe details, event dates or breadcrumb paths in the listing.

Formats

There are three syntaxes: JSON-LD, Microdata and RDFa. Google recommends JSON-LD because it lives in a separate <script> block and does not have to be woven into your visible HTML.

HTML
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Article",
  "headline": "How to Plan Your First 10K",
  "datePublished": "2025-03-14",
  "author": { "@type": "Person", "name": "Maya Ortiz" }
}
</script>
  • @context names the vocabulary.
  • @type is the kind of thing described.
  • Other keys are properties of that type; values can be text, numbers or nested objects with their own @type.

Common types

Type Used for
Organization / LocalBusiness Name, logo, contact details, address, hours
Article / BlogPosting Headline, author, dates, image
Product + Offer + AggregateRating Price, availability, reviews
BreadcrumbList Page position in the hierarchy
FAQPage, HowTo, Recipe, Event, Course, VideoObject Specific content types (rich result support changes over time)
WebSite with SearchAction Site name and search box information

Search engines change which rich results they display, so always check the current documentation for the type you use before relying on a visual result.

Product markup on a live page

Rules to follow

  1. Mark up what users can see. Do not add ratings, prices or FAQs that are not on the page. Misleading markup can lose you rich results or trigger a manual action.
  2. Use the most specific type that fits, and include the required and recommended properties.
  3. Keep it accurate and current. A price in markup that differs from the page is a quality problem.
  4. One consistent source. Generate JSON-LD from the same data as the page rather than writing it by hand twice.
  5. Escape properly. JSON must be valid: double quotes, no trailing commas, and </script> must never appear inside a string.
JSON
{
  "@context": "https://schema.org",
  "@type": "BreadcrumbList",
  "itemListElement": [
    { "@type": "ListItem", "position": 1, "name": "Home", "item": "https://example.com/" },
    { "@type": "ListItem", "position": 2, "name": "Running", "item": "https://example.com/running" },
    { "@type": "ListItem", "position": 3, "name": "Training plans" }
  ]
}

The last item may omit item because it is the current page. This is the markup counterpart of the breadcrumb navigation in Site Architecture and URLs.

Validating your markup

Run both of these before shipping:

  • Schema Markup Validator (schema.org): checks syntax and vocabulary for any type.
  • Rich Results Test (Google): checks eligibility for specific rich results.

You can also write a small checker for your own templates. The script below extracts every JSON-LD block from a page and reports missing required fields for a few types.

Python A tiny structured-data linter

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Beyond rich results

Structured data also feeds knowledge panels, helps disambiguate entities (use sameAs to link your organization to its official profiles) and gives machines a clean summary of a page. Keep it short and truthful and it will keep working as search features change.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Which structured data format does Google recommend?

    JSON-LD sits in its own script block, which makes it easier to maintain than inline attributes.
  2. 2. What is the main benefit of structured data?

    It clarifies meaning and can make a page eligible for rich results; it is not a direct ranking factor.
  3. 3. Which is a markup mistake?

    Markup must reflect visible content; invisible or invented data can lead to a manual action.
  4. 4. Which key declares the vocabulary in JSON-LD?

    @context points to schema.org; @type then names the kind of entity.

Summary

  • Structured data states facts explicitly using schema.org vocabulary.
  • Use JSON-LD, choose specific types and include required properties.
  • Only mark up content that is visible and accurate.
  • Validate with the Schema Markup Validator and Rich Results Test.
  • Rich result support changes, so check current documentation.

Next: JavaScript SEO and Mobile-First Indexing