What Is Schema Markup & How to Implement Structured Data

Luke Harsel

Sep 26, 20227 min read
What Is Schema

What Is Schema Markup?

Schema markup (also known as structured data) is a code standard used to help search engines understand and categorize webpage content.

It also provides specific details about webpage content, allowing search engines to display richer and more informative search results for users.

Like this one:

party cake schema recipe markup

Schema is a language used to represent data—the actual data is called structured data.

Structured data organizes your page’s content and makes the information easier for Google to understand. 

For example, you can use structured data on a birthday cake recipe page to let Google know the cook time, user ratings, and more like in the image above.

In this article, we’ll cover:

  • Different types of schema markup
  • Why schema markup is important for SEO
  • How to generate and test your own schema

Let’s begin with some examples.

Types of Schema Markup

Schema markup is code that describes elements on your website into a language that all major search engines understand. That way, search engines can present users with richer results.

A how-to markup, for example, tells Google that a specific piece of content is a step-by-step guide. Google can then give searchers a preview of each step within the search results page:

schema code

Google understands 32 types of schema. These are:

  • Article
  • Book
  • Breadcrumb
  • Carousel
  • Course
  • Dataset
  • Employer Aggregate Rating
  • Event
  • Fact check
  • FAQ
  • Home Activities
  • How-to
  • Image license
  • Job posting
  • Learning video
  • Math Solvers
  • Movie
  • Education Q&A
  • Estimated salary
  • Podcast
  • Practice problems
  • Q&A
  • Recipe
  • Software app (Beta)
  • Speakbable
  • Subscription and paywalled content
  • Video

Here are five common examples of schema and what they look like on the SERP (search engine results page):

Logo Markup

Logo markup tells Google what your logo is. That way, your correct logo will appear in the Google knowledge panel every time someone searches for your company.

Here is what the logo markup looks like in action:

logo schema on the Knowledge Panel

Local Business Markup

Local Business markup points out which elements of your website contain contact information, your address, and other important business details. Google then displays that information in a Local Business Panel on the right side of certain SERPs.

This markup ensures that Google gives those searchers the right information and encourages local foot traffic.

Here’s what it looks like:

local business markup

Review Markup

The review markup adds a star rating to the bottom part of your results page entry. It shows searchers what other people think of your site or products. This is helpful because customers are more likely to purchase products with reviews.

Here is what the review markup looks like in action:

review schema

Sitelink markup adds extra navigational links to your listing on the results page. Instead of just a link to your home page, searchers will also see links to your careers tab, blog, and other important pages.

Here is what sitelink markup looks like on the SERP:

sitelink markup

Product Markup

Product markup gives Google more information about products listed on your site so that searchers can see more details directly on the results page. 

It also gives Google an image of your product that can appear in Google Image Search. Image searches make up 22.6% of all searches, so you can miss out on a lot of traffic if you ignore it.

Here’s what product markup looks like in action:

product markup

Google won’t display rich results for all pages with structured data.

However, adding schema markup to your site will give you a higher chance of getting a rich result which takes up more real estate on the results page.

For example, your site could show up simultaneously as an organic result, as an answer to an FAQ, and as a video on the same results page.

So there are multiple chances for a user to click on your site, all from one search.

Why Is Schema Markup Important for SEO?

The point of structuring your data is to communicate better with search engines. When Google understands entities on a deeper level, it serves better results to searchers. 

Items like rich cards, rich snippets, and the knowledge panel appear on SERPs after gathering information from structured data.

While there’s no evidence that that schema will improve your rankings, it does provide a wealth of opportunities.

For example, a search result without sitelinks doesn’t give searchers much more than the title and meta description of the linked page:

search result with no sitelinks

On the other hand, a search result with sitelinks gives searchers the main linked page along with similar site pages that might interest them more:

search result with sitelinks

If the user wasn’t enticed to click by the title tag, there are still a few more chances to reel them in with sitelinks.

Some schemas act like digital billboards, too. Walmart takes up the entire above the fold portion of the SERP because of all the rich snippets it has:

walmart schema

Studies show that the improved real estate from rich results can improve click-through rate.

In fact, users click on rich results 58% of the time vs. 41% of the time for non-rich results.

Google has also stated that properly structured data can improve the overall appearance of search results (which provides a better user experience).

For example, with structured reviews, Google can show recipes with the most five-star ratings at the top of their results.

search result with ratings schema

Or, with structured data on songs and albums, Google can show what songs an artist sings as a series of rich cards.

Alanis Morissette song schema

So while there’s no hard evidence that structured data actually impacts rankings, it vastly improves the search experience. Users can read FAQs, see ratings, learn important business information, and more without ever visiting a page.

This can expand your brand reach and, as mentioned, potentially increase click-through rates.

How to Generate & Test Your Own Schema for Your HTML

There are three languages of code that you can add to your HTML to tell search engines what exactly is on your webpage: JSON-LD, microdata, and RDFa.

JSON-LD (Javascript Object Notation for Linked Objects) 

JSON-LD is a script added as a data block, separate from the rest of a page’s code. Google recommends using JSON-LD “whenever possible” because JSON-LD data blocks are easier to organize and change or edit, when necessary.

Here’s what it looks like:

json-ld example

In this example, the webpage code, <p> My name is Kelly </p>, is completely separate from the JSON-LD script below it.

Microdata

Microdata essentially does the same thing as JSON-LD but is formatted differently. The code needs to be embedded into a webpage’s HTML, which means it’s less beginner-friendly to write and update.

It’s also more difficult to use at scale for larger websites (like ecommerce sites).

Here’s an example of microdata in action:

microdata example

RDFa (Resource Descriptive Framework in Attributes)

RDFa is similar to microdata in that you add it to your page’s code through HTML tags and attributes. However, it’s a bit older and more complex. 

The benefit is that it can be easier to integrate it with other apps or platforms that also use it.

In practice, it looks like this:

RDFa example

How to Add Schema Markup

Follow these steps to add schema markup to your website.

1. Go to Google’s Structured Data Markup Helper tool

2. Select a Data Type

Choose one of the common data types from the given list. For this example, we chose “Articles.”

choosing article schema

3. Paste Your URL

Paste the URL of the page you want to add markup to. You also have the option to paste the HTML. Then, click “Start Tagging.”

start tagging schema

The tool will load your page so you can start marking it up. Your webpage will appear on the left side and the data items will appear on the right. Like this:

View schema markup

4. Start Marking Up Your Page

To begin, highlight the selection on the left you’d like to mark up. For an article, you can highlight the author and choose the “Author” data item from the menu that pops up.

tag the author of your page

The tool will take the author’s name and place it next to “Author” on the right-hand side.

author data markup

You can also tag items that can’t be found on your page. On the right side of your page, scroll down until you see the “Add missing tags” button.

add missing tags button

Click on the button to open a pop-up menu where you can manually add tags. For example, we manually added data to the URL tag.

manually add missing tags to your page

Continue adding markup items until you’re ready to generate your HTML.

5. Generate HTML

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

create HTML button

You’ll receive the code to add to your site. Click the drop-down at the top to choose between JSON-LD (recommended) and microdata.

choosing structured data type

6. Add the Markup to Your Site

Now that you have your updated code, add it to your CMS (content management system).

You have the option to copy and paste, or you can download the entire HTML file and upload it to your site.

download structured data

When you’re done, update the page you’re working on. Hit the “Finish” button to get a list of instructions if you’re not sure how to complete the next steps.

finish structured data

Now it’s time to test the markup you added to your page.

7. Test Your Structured Data

Google recommends using their Rich Results Test tool to test your schema markup:

Google rich snippet results test

Enter your URL or code snippet. Errors, warnings, and detected schema markup will show up on the right-hand side of the screen:

schema markup test

If you need to fix any errors, you can 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 to revalidate:

run test button

You can also test your entire site for schema markup issues with our Site Audit tool.

Either create a new project or click on an existing project in your Site Audit Dashboard.

Site Audit projects

Look for the Markup section within the Overview tab. Then, click the “View details” button.

markup report

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 your site has.

markup score

To see a full list of errors, scroll down to the “Structured Data Items” section. Click on the “View all invalid items” button.

view all invalid items button

Click on any entry in the “Affected Fields” column to see specific errors per identified issue.

affected fields

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

If you want to test your code for a different search engine, you can use Schema.org’s Schema Markup Validator.

Share
Find Keyword Ideas in Seconds

Boost SEO results with powerful keyword research

Free Keyword Research Tool

Author Photo
Content Writer. 6+ years at Semrush. Helping you understand how to use our SEO tools to solve your marketing problems.
More on this