Blog

Schema markup: what it is and how to add it

Schema markup is a block of code that tells search engines what a page is about in a form they don't have to guess at: this is a product, it costs £49, it's in stock. In return, a page can become eligible for rich results such as star ratings, prices and breadcrumbs in Google.

What schema markup is

"Schema" refers to schema.org, a shared vocabulary of types (Product, Article, LocalBusiness, Event) and their properties (price, author, address, startDate) that Google, Bing and other search engines agreed on. "Markup" is how you attach that vocabulary to a page. The result is often called structured data.

There are three formats: JSON-LD, Microdata and RDFa. Google says all three are fine when they're valid, but recommends JSON-LD where your setup allows it. JSON-LD sits in its own <script> block, separate from the visible HTML, so it is easier to write, read and maintain. Everything below uses it.

What it does for SEO

Structured data does two things:

What it doesn't do is guarantee anything. Google's documentation describes structured data as making pages eligible for enhanced display, and doesn't describe it as a ranking factor. Valid markup makes a rich result possible; Google decides whether to show one for each search.

Which types still earn rich results

Google's search gallery is the current list, and it changes. These are the ones most sites use:

Rich resultschema.org typeGood for
ProductProduct with OfferOnline shops: price, availability and, if you have real reviews, ratings
Review snippetReview, AggregateRatingProducts, recipes, software and businesses with genuine reviews on the page
ArticleArticle, BlogPosting, NewsArticleBlogs and news: headline, images, dates and author
BreadcrumbBreadcrumbListAny site with a hierarchy; the trail replaces the URL in results
Local businessLocalBusiness and subtypes such as DentistBusinesses with an address: opening hours, phone, location
OrganizationOrganizationYour logo, contact details and official profiles
EventEventConcerts, classes, webinars: dates and venue
Recipe, Video, Job posting, Software appRecipe, VideoObject, JobPosting, SoftwareApplicationSites built around that content

Two once-popular types no longer produce rich results. How-to rich results were retired in 2023. FAQ rich results were limited to well-known government and health sites in 2023, and Google stopped showing them altogether in May 2026. The markup is still valid schema.org, and other systems may read it, but adding it to win extra space in Google no longer works.

JSON-LD examples

A product page, with the price and availability that are visible on the page:

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Product",
  "name": "Trail Runner 2 Waterproof Shoe",
  "image": "https://example.com/img/trail-runner-2.jpg",
  "description": "Lightweight waterproof trail shoe with a 6 mm drop.",
  "sku": "TR2-WP-42",
  "brand": { "@type": "Brand", "name": "Example" },
  "offers": {
    "@type": "Offer",
    "price": "89.00",
    "priceCurrency": "GBP",
    "availability": "https://schema.org/InStock",
    "url": "https://example.com/shoes/trail-runner-2/"
  }
}
</script>

A blog post:

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "BlogPosting",
  "headline": "How to choose a trail running shoe",
  "image": "https://example.com/img/choosing-trail-shoes.jpg",
  "datePublished": "2026-10-01",
  "dateModified": "2026-10-20",
  "author": { "@type": "Person", "name": "Sam Lee", "url": "https://example.com/about/sam/" }
}
</script>

A breadcrumb trail, which suits almost every page below the homepage:

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "BreadcrumbList",
  "itemListElement": [
    { "@type": "ListItem", "position": 1, "name": "Shoes", "item": "https://example.com/shoes/" },
    { "@type": "ListItem", "position": 2, "name": "Trail running", "item": "https://example.com/shoes/trail/" }
  ]
}
</script>

Notice the details that trip people up: the price is a plain number with the currency in its own property, dates are ISO 8601 (2026-10-01), and every URL is absolute.

How to add it to your site

The rules that keep it working

  1. Mark up only what people can see. Google says not to add structured data about information that isn't visible on the page, even if it's accurate.
  2. Include every required property. Missing required properties make the item ineligible for its rich result. Recommended properties are optional but make the result fuller.
  3. Never invent ratings or reviews. Only mark up genuine reviews that are shown on the page. Made-up ratings are against Google's guidelines and can lead to a manual action that removes your pages' rich results.
  4. Keep it current. A sold-out product still marked InStock, or an old price, is a mismatch Google can act on.
  5. Use the most specific type. Dentist rather than LocalBusiness, BlogPosting rather than CreativeWork.

How to test it

Test while you write and again once the page is live. A validator shows every item on the page, which required and recommended properties are missing, and values that machines can't read, such as relative URLs or prices with currency symbols:

Then confirm with Google's Rich Results Test, which renders JavaScript and shows exactly what Google can use. Once the page is indexed, Search Console lists each rich result type it found in its enhancement reports, with errors across the whole site.

Questions

What does schema markup mean?

It means adding code, using the schema.org vocabulary, that describes what a page contains, such as a product, an event or an article, in a standard form search engines can read without guessing.

Is schema markup good for SEO?

Yes, for the right content. It doesn't raise rankings by itself, but it makes pages eligible for rich results, which stand out and tell searchers more before they click. For shops, local businesses, recipes, events and articles it's well worth adding.

What is an example of schema markup?

A Product block giving the product's name, image, price, currency and availability, as in the first example above. Google can use it to show the price and stock status in results.

Is JSON-LD better than Microdata?

Google supports both equally when they're valid, but recommends JSON-LD because it's separate from the HTML and easier to maintain. If your platform already outputs valid Microdata, there's no need to rewrite it.

How long does it take for rich results to appear?

Google has to recrawl the page first, which can take days or weeks. You can request indexing in Search Console's URL Inspection tool. Even then, eligible pages don't always get a rich result.