Schema.org structured data is not new. What is Schema.org structured data markup, anyway? Schema.org handles all of your website’s structured data requirements.
If you have any type of data on your page, such as contact information, NAP information, or other data that is considered structured data, then you can use Schema.org markup to code it.
This coding, in effect, highlights any structured data you might have on the page in a format that is easier for Google to understand.
If you’re looking to achieve rich results, a knowledge graph upgrade, rich snippets, and other types of results that rely on Schema.org structured data, you must implement it.
Table of Contents
What is Structured Data?
Where Does Google Use Structured Data in the SERPs?
Why Do You Really Need Schema.org Structured Data?
How Important is Structured Data for SEO?
How Does Schema Markup Work?
What Are Google’s Quality Guidelines for Structured Data?
Does Structured Data Work on Mobile?
How Do You Implement Structured Data?
Technical Details Behind a Sample Schema.org Implementation
What Do You Need to Know to Markup Data Accurately for Search Engines?
Troubleshooting Structured Data: Why is isn’t it Being Displayed?
What is Structured Data?
Structured data is a standardized format for making data easier for Google to understand. It accomplishes this by providing information about a page and classifying the page’s content.
For example: say you have an attorney website and you have NAP, or name, address, and phone number contact information that you want to make it easier for Google to parse.
This is an example of the kind of content that’s considered structured data.
Schema.org markup would be the markup you need to use to do just that.
Where Does Google Use Structured Data in the SERPs?
Quite simply, Google uses structured data to understand how to present the relevant structured data to its users.
Data by itself is unorganized and messy. Google needs structured data in order to parse and present it.
On the SERPs (search engine results pages), Google uses this format in order to generate types of search results snippets. These may be rich snippets, or whatever other type of snippet may be generated from using structured data.
Our article on the different types of search results provides more detail on the types of search results that structured data can generate.
Things like:
- Local Packs;
- Featured Snippets;
- Top Stories;
- Rich Snippets;
- Sitelinks; and
- much more.
Why Do You Really Need Schema.org Structured Data?
According to Semrush, 44% of U.S. Fortune 500 Companies are using Schema.org markup on their websites.
“We ran a quick study on the U.S. Fortune 500 companies using SEMrush data from the Site Audit tool to see how much microdata schema markup is used by these companies.
After a Site Audit with a crawl limit of 20,000 pages on each site we found that 280 (56%) of the 500 domains were not using any microdata schema markups at all. On the other hand, 220 (44%) of the domains used a microdata schema markup on at least one page of their website.”
Clearly, with significant time and money spent on Schema.org markup by these companies, it’s an important part of any SEO pro’s strategy.
How Important is Structured Data for SEO?
Even though Google is on record saying that structured data does not necessarily influence rankings as a ranking factor, ensuring its correct implementation will actually make your site a much better search result.
The enhanced nature of the results that structured data targets cannot be understated. They are quite visual in nature, which means that the more you target these results, the better your CTR (click-through rate) is going to be.
You will also succeed in making your site a much better result for the user who stumbles across it in the SERPs (search engine results pages).
Since most companies are not quite implementing structured data yet in full, this puts you ahead of your competition in most cases.
How Does Schema.org Markup Work?
In their developer documentation, Google explains the following about structured data:
“Google Search also uses structured data to enable special search result features and enhancements. For example, a recipe page with valid structured data is eligible to appear in a graphical search result.”
When you have data on the page that’s considered structured data, it must be coded using a specific type of in-page markup that is applied to the information itself. So, if you have name, address, and phone number information, you would probably want to use the corresponding data type on Schema.org.
Schema.org is a website that contains the entire Schema structured data vocabulary. This vocabulary includes all possible data types for a wide variety of scenarios and structured data that you may encounter on web pages.
The actual markup comes in a variety of encodings that you can use. These encodings include microdata, RDFa, and JSON-LD. What exactly are they and how do they benefit your structured data?
JSON-LD – Google specifically recommends using this format above all others in their Google developer documentation. Because this data is specifically included in the header in one single section, it’s much easier for Google to read and parse. It has a dynamic component to it that Google can read as well.
Microdata – This Schema.org markup is used to encode structured data within the HTML on your page. There are specific HTML tag attributes that must be used in order to ensure the proper encoding is correct. These attributes assign names to the structured data properties that you want search engines to pay attention to. It has valid uses in both the head and body of the HTML document.
RDFa – This is actually an HTML 5 extension. It supports something called linked data, with new HTML tag attributes that physically match the actual structured data you want to markup for search engines.
What Is a Data Type?
The data type forms the entire basis of your Schema.org coding work. This is what you will use to look up the item properties and other specifics that you need in order to compose your structured data markup.
On Schema.org, a data type refers to the specific vocabulary of markup that applies to that specific piece of data. If we were marking up video, for example, we would use the Video or VideoObject data type.
These data types should all be reviewed periodically to make sure that you haven’t missed anything or otherwise implemented anything incorrectly.
What Are Google’s Quality Guidelines for Structured Data?
Believe it or not, Google still has quality guidelines in place for structured data. When working on your structured data implementation, you want to ensure that you follow all of their guidelines to the letter. Google has been known to give out manual actions and penalize sites algorithmically due to spammy misuse of structured data.
The following is a small section of Google’s entire quality guidelines for structured data located here.
- “Follow the Google webmasters quality guidelines.
- Provide up-to-date information. We won’t show a rich result for time-sensitive content that is no longer relevant.
- Provide original content that you or your users have generated.
- Don’t mark up content that is not visible to readers of the page. For example, if the JSON-LD markup describes a performer, the HTML body should describe that same performer.
- Don’t mark up irrelevant or misleading content, such as fake reviews or content unrelated to the focus of a page.
- Don’t use structured data to deceive or mislead users. Don’t impersonate any person or organization, or misrepresent your ownership, affiliation, or primary purpose.
- Content must not promote pedophilia, bestiality, sexual violence, violent or cruel acts, targeted hatred, or dangerous activities.
- Don’t mark up content that engages in illegal activities or promotes goods, services, or information that facilitates serious and immediate harm to others. Marking up content that provides information about such content for educational purposes is permitted.
- Content in structured data must also follow the additional content guidelines or policies, as documented in the specific feature guide. For example, content in JobPosting structured data must follow the job posting content policies. Content in Practice problems structured data must follow the Practice problems content guidelines.”
Does Structured Data Work on Mobile?
The short answer is: Yes! Structured data works just fine on mobile.
Because it is mostly a non-visible markup solution, it does not affect your design in any way whatsoever.
We need to emphasize this because there may be some misconceptions out there—among the less initiated—that structured data doesn’t work on mobile.
We want to make sure that we put that to rest right away.
How Do You Implement Structured Data?
You can begin implementing your own structured data by using Microdata, JSON-LD, and RDFa. We are going to help you learn how to use all three in this guide.
Technical Details Behind a Sample Schema.org Implementation
If we’re talking about the implementation of structured data through its coding languages—Microdata, RDFa, and JSON-LD, then our technical details would include a framework for coding, testing, and deploying your implementation.
The general technical details would include the following framework you will want to use in order to create your structured data implementation:
- Develop
- Test
- Deploy
When you develop your structured data, you’re working with code, and making sure the formatting is correct before you test it.
When you test your structured data, you’re using a testing tool, usually Google’s structured data testing tool.
After you test your structured data, you’re ready for the final deployment, which allows you to finally launch your structured data and make it live on your website.
Develop Your Structured Data
You will want to develop your structured data first. We recommend using a text editor such as notepad or notepad++ to create your code.
This way, you don’t introduce any strange characters that won’t be readable by the Google structured data testing tool.
Keep in mind that standard coding best practices apply, so you want to make sure that you open your tags, close your tags, and all that good stuff, and that you don’t abandon standard coding best practices.
Test Your Structured Data
The way you test your structured data is by using Google’s Rich Results testing tool.
In this testing tool, you have two options:You can test through the URL, or you can test via the actual code.
Testing through the URL is quite simple, really—just enter the URL you want to test, and you’ll be able to quickly test your Schema.org structured data on that pge.
Testing through the code is also relatively easy – you can just copy and paste the actual code that you want to test.
Deploy Your Structured Data
After you have made your way through the development and testing phases, now you can deploy your structured data.
On WordPress you have several options, including the following:
- physically modifying header.php if you’re using JSON-LD;
- using the Yoast plugin for including Schema;
- using the Rank Math plugin for including Schema; or
- using another independent plugin for including Schema.
Of course, if you have a static HTML site that’s not based on a CMS, then you will be editing the HTML directly.
Whichever method you choose, deploying your structured data is the last step in the process.
Next, we’re going to take a look at how to actually mark up your data in more detail.
How to Mark Up Your Data With Microdata
The best thing about Microdata is that it is relatively simple, and easy to learn for beginners (especially if you just started learning how to code HTML).
The downside, however, is that you have to mark up each item individually within the content body of that page.
This can become messy, especially if there are many pieces of data to mark up.
JSON-LD, however, can be coded mostly within the header of the page, and this allows for the easiest implementation possible.
Before starting your coding project however, you do need to begin with research.
What kind of structured data are you trying to encode? Are they reviews, music, recipes, events, or videos?
This decision will be the defining factor in terms of how you tag your code.
So let’s consider a situation where you might have a site for a restaurant called Beef Heaven. Your home page may look like the following:
<div>
<h1>Beef Heaven</h1>
<p>Address:</p>
<p>170 Spring Way</p>
<p>Seattle, WA</p>
<p>Tel: 714-123-4567</p>
<p><a href=”https://restaurantsite.com/menu”>Check out our menu!</a></p>
<p>We are open during the following hours:</p>
<p>Mon-Fri 9:00 am – 8:00 pm</p>
<p>Sat-Sun 11:00 am – 7:00 pm</p>
</div>
In this section, all the structured data displayed belongs to the restaurant, and is denoted by the beginning and ending DIV tags.
Our first step here is to identify the item type that we want to use on Schema.org.
In this case, this would be the itemtype on this page – https://schema.org/Restaurant
First, we are going to add in the following:
<div itemscope>
The item scope refers to, well, the scope of the item we are referring to. However, what is the type of data we are referring to?
This is defined by the itemtype page we looked up prior: https://schema.org/Restaurant,
in which case, we will add this plus itemtype to the div tag:
<div itemscope itemtype=”https://schema.org/Restaurant”>
Schema.org is full of item types that are dependent on the specific data you are trying to mark up. If you were to mark up a video, you would probably want to use https://schema.org/video.
Not everything is going to be specifically on Schema.org, and if there isn’t anything available, it’s likely that it doesn’t exist yet.
We always want to make sure that we’re using valid item types that are on the Schema.org website.
Next, we are going to add something called the itemprop tag, which, as you may have already guessed, includes the properties of the item.
<h1 itemprop=”name”>Beef Heaven</h1>
For this Schema exercise, we are going to move forward with tagging the remainder of our page in this manner.
It’s not necessary to tag the entire line with the code. We’re only concerned about the specific piece of data being tagged.
For example, a street address would be tagged with itemprop=”streetAddress”. A phone number would be tagged with itemprop=”telephone”, and so on.
Let’s examine how we move forward with marking up the rest of this data:
<h2 itemprop=”description”>We love beef and hope you do, too!</h2>
<div>
<h2>Beef Heaven</h2>
<p>Address:</p>
<span itemprop=”address” itemscope itemtype=”https://schema.org/PostalAddress”>
<p itemprop=”streetAddress”>170 Spring Way</p></span>
<p itemprop=”addressLocality”>Seattle, WA</p></span>
<p>Tel: <span itemprop=”telephone”>714-123-4567</span></p>
<p><a itemprop=”menu” href=”https://restaurantsite.com/menu”>Check out our menu!</a></p>
<p>We are open during the following hours:</p>
<p itemprop=”openingHours”>Mon-Fri 9:00 am – 8:00 pm</p>
<p itemprop=”openingHours”>Sat-Sun 11:00 am – 7:00 pm</p>
</div>
If you are easily intimidated by this, don’t worry.We’re here to help you with all the details!
It’s important to note here as well that Schema.org has samples on just about every page on their site, so don’t worry if you get stuck. They will show you how to use this data in your final output so it is implemented correctly.
Microdata Markup Tools
Structured Data Linter
This is a relatively simple (but effective) tool for verifying your structured data. You can paste the URL, copy and paste your code, or even upload a file to check your markup.
Structured Data Linter
How to Mark Up Your Data Using RDFa
RDFa, or Resource Description Framework in Attributes, is an HTML 5 extension. This extension was designed to help you mark up your data. The W3C – the World Wide Web Consortium – recommends using RDFa markup as a standards-compliant Schema markup solution.
RDFa is not all that different from Microdata. So if you’re already familiar with Microdata, you won’t have to learn all that much else to work with RDFa.
Let’s take a look at the original markup of our restaurant again:
<div>
<h1>Beef Heaven</h1>
<p>Address:</p>
<p>170 Spring Way</p>
<p>Seattle, WA</p>
<p>Tel: 714-123-4567</p>
<p><a href=”https://restaurantsite.com/menu”>Check out our menu!</a></p>
<p>We are open during the following hours:</p>
<p>Mon-Fri 9:00 am – 8:00 pm</p>
<p>Sat-Sun 11:00 am – 7:00 pm</p>
</div>
The first step, as always, is to make sure that we identify the vocabulary we are using, making sure it’s Schema.org and that we’re making an accurate reference to the restaurant data type.
Don’t worry if this all appears intimidating—Schema.org also has tabs that show specific RDFa mark ups you can use, so you’re not going it alone.
Let’s get started coding our mark up, shall we?
OK, here’s the first part of the code in the div tag—this establishes both the Schema data type and the vocabulary we are using.
This specific line tells the search engine that this section includes information about a restaurant.
Unlike Microdata, data types are explicitly included using words instead of URLs.
<div vocab=”https://schema.org/” typeof=”restaurant”>
Here, we explain to the search engine that our data section is about a restaurant, but we haven’t yet given enough information about the rest of the elements to really mean anything.
This is where the properties come in, very similar to the itemprops in regular Schema mark up.
In our H1 tag, we want to tag the restaurant’s name in this fashion:
<h1 property=”name”>Beef Heaven</h1>
The one thing about RDFa is that if you want to define properties even more, it’s possible to do so. in this manner:
<div property=”address” typeof=”PostalAddress”>
In microdata, the itemtype property is roughly the equivalent to typeof when we’re talking about RDFa. Property, of course, is then the equivalent of the itemprop element when it comes to microdata markup.
Schema.org also has all the RDFa types and properties you can use with those types defined on their website. They include full examples, so you never have to worry whether or not you are coding something correctly.
It’s all there for you to reference while you work on your own Schema code.
Let’s take a look at our final RDFA Schema markup:
<h2 property=”description”>We love beef and hope you do, too!</h2>
<div property=”address” typeof=”PostalAddress”>
<h1 property=”name”>Beef Heaven</h1>
<p>Address:</p>
<div property=”address” typeof=”PostalAddress”>
<p property=”streetAddress”>170 Spring Way</p>
<p property=”addressLocality”>Seattle, WA</p>
</div>
<p>Tel: <span property=”telephone”>714-123-4567</span></p>
<p><a property=”menu” href=”https://restaurantsite.com/menu”>Check out our menu!</a></p>
<p>We are open during the following hours:</p>
<p property=”openingHours”>Mon-Fri 9:00 am – 8:00 pm</p>
<p property=”openingHours”>Sat-Sun 11:00 am – 7:00 pm</p>
</div>
There are several resources that will be helpful to you when it comes to working with RDFA. One of them is this information on the Schema.org website.
The other one includes the specifications for the RDFa Core 1.1 as recommended by the W3C.
You can also use the RDFa testing tool here for best results, because it will help you determine if there are any errors in your existing code.
All of these resources will help you in determining the proper context along with how to implement RDFa Schema markup as a whole.
RDFa Markup Tools
RDFaCE WordPress Plugin
This WordPress plugin is for utilization with TinyMCE rich text editor. It allows users to easily annotate blog posts using RDFa markup, along with Microdata.
RDFaCE Plugin
RDF Translator
This one is a good RDFa markup translator. It also outputs other types of languages not commonly used by other tools.
RDF Translator
How to Mark Up Your Data Using JSON-LD
JavaScript Object Notation for Linked Data, or JSON-LD, is a method of encoding linked data. Like RDFa, this is a W3C recommendation and thus is a web standard.
JSON-LD is probably the most simple of all coding implementations. It allows you to focus on the header of the page, and lets you create a rather fast Schema.org mark up implementation in mere minutes.
This is likely the best way to go for those who are a little more advanced.
You do have to deal with significant coding on JSON-LD in comparison to other formats like RDFa and Microdata. If you don’t have the stomach for coding, then you may want to opt for RDFa and Microdata.
They are simpler to use than JSON-LD. But, if you have more coding experience, you may want to opt for JSON-LD.
The primary drawback is that you have to repeat the content when using JSON-LD. However, with Microdata and RDFa, you can add tags to the existing content.
This should not have any significant bearing on your content so long as you can simply mark it up with JSON-LD.
Later in this section, we will help you through all the JSON-LD tools that are available to help you create your mark up.
For now, let’s get started with marking up our restaurant example.
JSON-LD, as a rule, is created by establishing opening and closing script tags (<script></script>, for example). This is the line we would use to denote the fact that we’re using JSON-LD code:
<script type=”application/ld+json”>
Curly brackets are used to contain the rest of your code, like this:
<script type=”application/ld+json”>
{
example code
}
</script>
Next in the JSON-LD code, we need to establish the context of the code. Basically, the context will establish the vocabulary we are linking the data to. In this case, it’s going to be linked to Schema.org.
“@context”: “https://schema.org”,
Next comes the type attribute. This one is pretty much the equivalent of the itemtype element in Schema.org Microdata. In RDFa, it would be equivalent to the typeof element.
For our example, we’re using a restaurant.
“@type”: “Restaurant”,
Defining the restaurant’s name and description is next in the process. If, as part of our process, we were utilizing Microdata, or RDFa, the elements would need to be physically included on the page itself. But with JSON-LD, this is not the case.
“name”: “Beef Heaven”,
“description”: We love beef and hope you do, too!”,
One of the characteristics of JSON-LD is that it nests various data types. These different types are sub-types of the main data type.
These subtypes are included in yet one more set of nested curly brackets:
“address”: {
“@type”: PostalAddress”,
“addressLocality”: “Seattle, WA”,
“streetAddress”: “170 Spring Way”,
},
The opening hours are next. Of course, we have a couple of sets of these elements, so we’re going to separate these on different lines. What’s different about this particular data is that it’s being included within an array, which is denoted by the square brackets, rather than curly brackets.
“openingHours”: [
“Mon-Fri 9:00-8:00”
“Sat-Sun 11:00-7:00”
],
Our next and final step is to add in the link to the menu along with our telephone number. These are pretty straightforward. The only difference is that the phone number must be written as a continuous string – no dashes or other symbols other than the “+” sign should be included with the phone number:
“telephone”: “7141234567”
“menu”: “https://restaurantsite.com/menu”
This means our markup is now complete!!! The final version of the mark up should look like the following:
<script type=”application/ld+json”>
{
“@context”: “http://schema.org”,
“@type”: “Restaurant”,
“name”: “Beef Heaven”,
“description”: “We love beef and hope you do, too!”,
“address”: {
“@type”: “PostalAddress”,
“addressLocality”: “Seattle, WA”,
“streetAddress”: “170 Spring Way”
},
“openingHours”: [
“Mo-Sa 12:00-21:30”,
“Su 13:00-20:00”
],
“telephone”: “+441234567890”,
“menu”: “http://www.noodleparadise.com/menu”
}
</script>
JSON-LD Tools
Webcode.tools
This is a nice JSON-LD script generator. It also lets you generate code for other formats.
Webcode.tools
Schema Pro WordPress Plugin
This is a Schema plugin for adding Schema markup to your WordPress pages and posts. It’s one of the top, highly-regarded Schema plugins in the space.
Schema Pro Plugin
Google Structured Data Markup Helper and Data Highlighter
These are both useful Google-based tools for helping you better understand and code your structured data.
Google Structured Data Markup Helper and Data Highlighter
Schema Markup Generator
This is yet another JSON-LD markup generator. Use this tool to quickly generate your own Schema markup for the most common formats and purposes.
Schema Markup Generator by Merkle
MicrodataGenerator.com Schema.org Generator
Aside from the misnomer, it’s not really a microdata format generator. It’s a JSON-LD markup generator, and a relatively simple one at that. Just fill in the fields and click on generate.
Microdata Generator JSON-LD Generator
JSON-LD Generator by Hall Analysis
The JSON-LD generator here was written by Joe Hall, an SEO practitioner with his own consultancy over at Hall Analysis.
JSON-LD Generator by Hall Analysis
What Do You Need to Know to Markup Data Accurately for Search Engines?
There are three things you’re going to need to know to markup your structured data accurately and correctly.
- You’re going to need to know how you’re going to markup your data (whether it’s through RDFa, Microdata, or JSON-LD).
- You’re going to need to know what data you’re marking up.
- You must know the specific data type you’re going to use.
First, you have to know what language you’re going to use to markup that data. If you’re managing the website, you probably know this already.
If you’re not, you’re going to have to find that out before you proceed with the next step.
Next, you’re going to have to know what data you’re marking up, because the next part of the process will be dependent on exactly what data you’re going to code.
Third, you’re going to need to know the specific data type that you need to use for marking up your data.
That can be found on Schema.org.
How do you use the Schema.org website?
It’s a simple search process.
Depending on your industry, you will need to search for specific Schema.org data types that address certain types of data within that industry.
For attorneys, you will want to use the attorney data type.
For restaurants, you may want to use the restaurant data type.
For a service-based business, you will want to utilize the service data type.
There are also more specific data types depending on what you are doing with that data.
Once you have the above three items, you can proceed with the technical samples we have outlined above.
Troubleshooting Structured Data: Why is it Not Being Displayed?
Or, more to the point: why is your structured data not being displayed accurately?
One of the most important things to remember about this is to make sure that all of your punctuation is in the correct place.
Are your commas right? Are your periods correct? While this may or may not show up in Google search, if you don’t have your punctuation correctly formatted, you run the risk of serious display issues with your structured data.
This is especially true with things like commas.
Sometimes commas can stray and appear outside of your code, like this:
<p>123 Dyer Road</p>,
<p>Apartment #2</p>
It’s better to make sure that your commas appear within your markup, if you want to ensure that they appear properly within your rich snippet, like this:
<p>123 Dyer Road,</p><br />
<p>Apartment #2</p>
While your issues with punctuation could stem from situations like this, it could lead to errors in how your structured data is displayed.
This is true, especially when you need to rely on punctuation to convey the proper meaning and context of your information.
Also, the format in which you code your Schema markup is important.
If you’re coding your markup, you want to make sure that you’re using a text editor or code editor, such as Notepad++, Microsoft Visual Studio Code, or Dreamweaver.
Any one of these three are good code editors that you can use to ensure that your Schema markup is formatted correctly.
By using a testing process that includes Google’s Rich Results Test, along with a quality code editor, and making sure that you pay attention to the smaller details like your punctuation, you can ensure that your rich snippets all show up better than your competitors.
Are You Not Using Schema Markup Yet? Why Not?
If you’re not using Schema markup yet, why not?
We highly recommend implementing Schema as part of your overall SEO strategy. It can help you to eventually show up for rich snippets, and thus increase your online visibility.
With many brands already implementing Schema on their websites, the competition could already be ahead.
If it’s not, then you may have an opportunity in your niche.
Even if they are, Schema is still yet another opportunity to optimize.
What are you waiting for?