What Is Schema Markup? & How to Add It to Your Site

Zach Paruch

Mar 12, 20258 min read
Contributor: Tushar Pol
What Is Schema
Share

TABLE OF CONTENTS

What Is Schema Markup in SEO?

Schema markup (also called structured data) is a type of code you add to your website to help search engines understand your content better.

It makes your content eligible to have search engines like Google show extra details in search results. Like star ratings, prices, and whether a product is in stock.

These enhanced search results are known as rich snippets.

If these details show in search results, users can find valuable information directly within search results.

For example, Dell’s product page for computers, monitors, and other tech solutions uses schema markup. And Google displays information like price range, product availability, delivery fee, and more in the page’s search result.

Dell search result with price, product availability, delivery status, return information, and sitelinks

Just know that adding schema markup doesn’t guarantee rich results. Ultimately, it’s up to Google to decide whether it wants to show rich formats.

Why Is Schema Markup Important for SEO?

Schema markup is important for search engine optimization (SEO) because it helps search engines understand your content better, which may help Google display your content for more relevant keywords.

Structure data can also encourage search engines to display your content as richer, more engaging results in search.

Which can lead to:

  • Improved search visibility: Rich snippets increase the visibility of your content in search results
  • Higher click-through rate (CTR): Eye-catching details in your results may encourage a greater proportion of searchers to click your link
  • Better user experience (UX): Users immediately see key information that they can use to decide if your page meets their needs

Without schema markup, your page will probably only show as a simple, blue link. And if your competitors are using schema markup and getting rich snippets, then your link won’t stand out.

Common Types of Schema Markup

Google supports dozens of schema markup types, but you don’t need to use them all.

In this section, we’ll explore some of the most commonly used types of schema.

Organization Markup

Organization schema markup tells search engines more about your business, such as its name, logo, address, and contact details.

Organization schema can help your organization details appear in a knowledge panel in Google search results.

Like so:

Product Snippets Markup

Product snippet markup is one of two types of product schema markup used to provide search engines with extra product details for pages where users cannot make a purchase—like product review pages.

This type of markup encourages search engines to display information, such as:

  • Ratings and reviews: Aggregated customer reviews and opinions
  • Pros and cons: Key advantages and disadvantages of the product (only available for editorial product review pages)
  • Price and availability: Basic pricing information without direct purchase options

Product structured data is particularly valuable for editorial websites, affiliate marketers, and ecommerce platforms showcasing products but not selling them directly.

Let’s say a tech review site publishes an in-depth review. And adds product snippet schema markup to the page.

Google can choose to display star ratings, review summaries, and pros and cons directly in the search results.

Snippet on the Verge with more information like pros and cons and price

Merchant Listing Markup

Merchant listing markup is the second type of product markup specifically for product pages, but it’s for pages where users can make a purchase.

It can display key purchase-related details, such as:

  • Pricing and discounts: Regular prices, sale prices, and promotions
  • Stock availability: Indicates if the item is in stock, on back order, or out of stock
  • Shipping and returns: Delivery estimates, shipping fees, and return policies

This markup is ideal for ecommerce websites and online retailers that want to give potential buyers purchase-related information directly in search results.

Like this:

Products with more information listed in Google search results

Review Schema Markup

Review schema markup can display star ratings, review summaries, and other review-related details in search results. 

Google supports review snippets for various structured data types, including:

  • Product
  • Local business
  • Movie
  • Book
  • Software app
  • Recipe

Review markup typically appears in one of two formats.

The first is a single rating along with the reviewer's name and a rating:

Single review in Google Search results

The second is an aggregate rating, which shows an average score based on multiple user reviews (the total number is indicated in parentheses):

aggregate review in Google Search results

Article Markup

Article markup helps search engines understand news articles, blog posts, and sports articles. To make you eligible for a rich snippet in Google Search and Google News.

It can influence how article headlines, author names, and publication dates appear in search results. 

Like this:

Articles about the Oscars in Google Search Results in the "Top Stories" SERP feature

Further reading

Local Business Markup

Local business markup gives search engines key information about a physical business, including its address, phone number, and operating hours.

It’s great for brick-and-mortar shops, restaurants, service providers, or other businesses aiming to attract local customers. Because it can complement the profile that shows in Google Search and Google Maps results. 

A Google Business Profile for Bestia

Further reading

Schema Markup Language and Formats

Schema markup uses a shared vocabulary from Schema.org to help search engines interpret and display content in rich results.

It’s added to HTML, the foundational markup that structures webpages.

Google supports three main schema markup formats:

Format

Description

When to Use

JSON-LD

A JavaScript-based format placed within <script> tags in the <head> or <body> of your HTML

Ideal for most sites, as it keeps the HTML cleaner and is easy to update and debug

Microdata

Embeds structured data attributes directly into your HTML elements

If you prefer tighter integration with existing HTML content

RDFa

Uses different HTML attributes (often in <div> tags) to define structured data

When advanced annotations or linking structured data with semantic web standards is needed

Below are examples of how you can implement the same structured data using JSON-LD, Microdata, and RDFa.

JSON-LD is placed inside <script> tags, making it easier to read, maintain, and modify without affecting the structure of your HTML.

<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Person",
"name": "John Doe",
"jobTitle": "Software Engineer",
"url": "https://example.com"
}
</script>

Microdata is embedded directly into your HTML elements, making it part of the page structure.

<div itemscope itemtype="https://schema.org/Person">
<p>Name: <span itemprop="name">John Doe</span></p>
<p>Job Title: <span itemprop="jobTitle">Software Engineer</span></p>
<p>Website: <a href="https://example.com" itemprop="url">Profile</a></p>
</div>

RDFa also integrates structured data into HTML but uses attributes such as vocab, typeof, and property to define relationships within the content.

<div vocab="https://schema.org/" typeof="Person">
<p>Name: <span property="name">John Doe</span></p>
<p>Job Title: <span property="jobTitle">Software Engineer</span></p>
<p>Website: <a href="https://example.com" property="url">Profile</a></p>
</div>

Each format provides structured data to search engines, but JSON-LD is the most widely supported and recommended by Google.

How to Add Schema Markup to Your Website

You can manually insert schema into your HTML or rely on plugins if your site runs on a content management system (CMS) like WordPress

Here’s how to generate and add schema markup to your site:

1. Select Your Schema from Google’s Structured Data Markup Helper

Go to Google’s Structured Data Markup Helper, choose a schema type, enter your URL, and click “Start Tagging.”

Structured Data Markup helper with "Articles" and the URL field highlighted

Your webpage will appear on the left. Data items for markup will appear on the right.

Markup helper widget on the right

2. Mark Up Your Page

Using the tool, highlight the section on your page that you’d like to mark up.

For example, for an article, highlight the title and choose the “Name” data item from the menu that pops up. 

Markup helper for "Name"

The tool will then take the article’s title and place it next to “Name” on the right-hand side.

The name entered into the markup helper widget

Then, highlight the author name and choose the “Author” data item.

Markup helper for labeling the "author"

The tool will then take the author name and put it next to “Name” on the right-hand side.

Author name in the markup helper widget

Continue adding as many relevant markup properties as you can.

3. Generate the HTML

When you’re done marking up your page, click on the “Create HTML” button on the top right of the screen.

"Create HTML" button in markup helper

You'll receive JSON-LD markup by default (Google’s recommended format), but you can switch to Microdata using the drop-down menu. 

Download as either microdata or JSON-LD

4. Add the Schema Markup to Your Website

Now that you have your code, add the schema markup to your webpage’s HTML <head> section.

You can easily copy the markup from the tool.

HTML code to copy into your website's code

If you’re using a CMS like WordPress, you can use a plugin like SchemaPro, Rank Math, or Yoast to add schema markup without editing HTML. 

For example, Yoast SEO generates organization schema using your business name, logo, and other details in the plugin’s settings. And inserts the schema into your website’s code.

Organization schema helper in Yoast

5. Validate the Markup

Validate the schema markup using Google’s Rich Results Test

Enter your URL or paste the generated schema markup into the tool. And it’ll confirm if your markup is valid.

Rich results test start page

Errors, warnings, and detected schema markup will show up on the right side of the screen:

rich results test results

If you need to fix any errors, edit your code directly on the left side of the page. 

After you make changes, click the “Run Test” button at the bottom of the page:

re-run test

Schema Markup Best Practices

Follow these best practices to ensure your schema markup is effective and compliant with Google’s structured data guidelines:

  • Focus on pages that benefit from rich results: Add schema to pages like product listings, reviews, articles, and local business pages, as these are more likely to show enhanced search results
  • Only use relevant schema: Make sure the schema type accurately matches your page
  • Keep the markup up to date: Regularly check and update your schema—especially for details that change over time, such as product prices or business hours
  • Add as much relevant information as possible: If your schema type supports multiple details, fill out as many as you can. For example, local business schema can include opening hours, accepted payment methods, and location details.
  • Ensure schema matches other online listings: Make sure your schema details are consistent with similar details on your Google Business Profile, social media, and other websites
  • Use the most specific schema type: Use the most precise schema subtype for organizations (e.g., “Restaurant” instead of just "LocalBusiness") 
  • Always test your structured data: If your schema contains errors, Google may issue a structured data manual action, making the page ineligible for rich results. While this won’t affect SEO rankings, it can reduce your visibility in search results.

Check Your Website’s Schema Markup

Regularly auditing your site’s schema markup ensures it remains accurate.

The Semrush Site Audit tool can automate this process, helping you find and fix schema-related issues across your entire website.

First, set up a full audit of your site.

Once the audit is complete, look for the “Markup” section within the “Overview” tab. Then, click the “View details” button.

markup report in Site Audit's thematic reports

You’ll get a markup score that indicates how much of your schema data is valid or invalid. The higher your score, the fewer errors you have.

Markup report generated by Site Audit with the markup score highlighted

To see a full list of errors, scroll down to the “Structured Data Items” section. 

Click on the “View all invalid items” button.

structured data items in site audit, indicating whether structured data is valid or not

Click on any entry in the “Affected Fields” column to see specific errors for a given page.

affected fields for structured data issues

If any errors show up for your site, revisit the Structured Data Markup Helper to generate new markup, then validate it again with the Rich Results Test.

Share
Author Photo
Zach Paruch is an SEO strategist with over ten years of experience driving organic growth across a diverse range of verticals. His expertise includes on-page and technical SEO, international SEO, and content strategy—with a special focus on ideating and implementing AI-driven processes. By leveraging in-depth search intent analysis, refined information architecture, and user-centered design, Zach consistently delivers high-impact content that resonates with audiences.
Subscribe to learn more about General SEO
By clicking “Subscribe” you agree to Semrush Privacy Policy and consent to Semrush using your contact data for newsletter purposes
More on this