How to Add Structured Data to a Web Page

Add JSON-LD structured data to a page, pick the schema.org type that matches the content, and validate it with the Rich Results Test and Search Console.

Structured data tells search engines what a page is: an article, a product, a set of steps, a list of questions. Google uses it to show rich results such as ratings, prices, and breadcrumbs. The format Google recommends is JSON-LD, a small script block added to the page.

Pick a schema.org type that matches the page

Choose the type whose definition fits the page's main content: Article for posts and news, HowTo for step-by-step instructions, Product for a product page, FAQPage for a list of questions with answers, BreadcrumbList for the navigation trail. Look the type up on schema.org to see its properties. Do not choose a type for the rich result you want if the content does not fit it.

Write the JSON-LD block

Add a script with type="application/ld+json" inside <head> or <body>. A minimal Article:

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Article",
  "headline": "How to Replace a Kitchen Tap",
  "datePublished": "2026-09-11",
  "author": {
    "@type": "Person",
    "name": "Jane Smith"
  }
}
</script>

@context is always https://schema.org. @type is the type you picked. The remaining keys are properties of that type; add image, dateModified, and description where they apply. Dates use ISO 8601 format.

Fill in the properties Google reads

Each rich result type has required and recommended properties listed in Google Search Central's structured data documentation. Match those first. For Product that means name, image, and an offers object with price and priceCurrency; for BreadcrumbList, an itemListElement array with a position, name, and item for each crumb.

Validate with the Rich Results Test

Open Google's Rich Results Test, paste the page URL or the raw HTML, and run it. It reports which items it detected, errors that block a rich result, and warnings for missing recommended properties. Fix the errors until the item shows as eligible. The Schema Markup Validator on schema.org checks any type, including ones Google shows no rich result for.

Check Search Console after deploying

Once the page is live and crawled, Search Console lists each detected type under Enhancements in the left menu, with counts of valid items, items with warnings, and invalid items across the site. Errors there point at specific URLs.

Mark up only what is on the page. Structured data must describe content a visitor can see. Adding ratings, prices, or questions that do not appear on the page violates Google's guidelines and can lead to a manual action that removes rich results for the whole site.

More Websites how-tos