Different Types of Schema Markup
When search engines crawl your web page, they can only understand so much. Some elements such as videos and reviews aren’t easily understood. By adding schema markup (structured data), we can tell engines what information the web page contains. The most popular search engines support three types of schema markup formats:
In 2015 Google announced JSON-LD as the preferred method. This announcement was significant since Google hadn’t stated a preference for one format over another. Up until this point, Google preferred webmaster only markup the text that was visible on the page. This is referred to “inline” markup.
An example of inline Microdata markup.
When viewed on a web page it would appear as:
687 River Run Boise, ID 83702
This change is significant because if you’re not familiar with in-line programming formatting such as Microdata can be complicated to implement. Sometimes it can limit the design of a web page. JSON-LD is hidden so it has no effect on the rendering of a web page and is much easier for webmasters to implement.
What is JSON-LD?
As we stated earlier one of the main advantages with JSON-LD over other methods is that it doesn’t have to be present in the <body> of a page. Instead, it is embedded in a <script> tag and can be placed anywhere on the page. Unlike other methods JSON-LD doesn’t have to be placed inline so you don’t have to change HTML elements.
Example of JSON-LD
What is Microdata?
Microdata is a set of tags that allows you to mark up your web page. These tags are added directly to the HTML.
Each set of tags will consist of itemscope, itemtype and itemprops.
The itemscope tag is used to identify what item is being referenced. Itemscope is followed by an itemtype tag. Itemtype identifies the type of item the microdata is referencing. For example, it could be a local business or recipe.
Finally, we use itemprop to markup each property. Let’s look at the Microdata below for a local business.
With Microdata markup.
We can see it begins with:
This identifies everything between the div tags <div…….</div> as being the markup for a local business.
Next, we see itemprop for the different properties that can be found on the page.
Notice how the Microdata wraps around the content of your page. If you’re not familiar with programming, this can become very complicated.
What is RDFa?
RDFa (Resource Description Framework in Attributes) is an extension to HTML5 used to markup metadata within web pages. RDFa is similar to Microdata and just like Microdata RDFa uses tags inline with the existing HTML.
Using the same example from above here is what RDFa markup would look like.
RDFa uses three tags vocab, typeof and property. From the sample above the first line establishes the vocabulary being used “schema” and typeof establishes what the page is about “LocalBusiness.”
Next we markup all the information with property tags.
What Method of Structured Data Is Right for You?
Personally, I would go with JSON-LD. It is much easier to implement, and it’s the recommended method by Google. It is also supported by the largest search engines, so the future of JSON-LD looks good.
But if you would like to explore the other options keep this in mind.
- Microdata is much more popular than RDFa and can be found on sites such as eBay.
- You will need HTML experience to markup data with Microdata or RDFa.
- To deploy Microdata and RDFa, you will need to edit your website files.
Now compare this to JSON-LD.
JSON-LD isn’t actually visible on your page. You still get the same results using JSON-LD without the added hassle of changing your HTML or accessing your website files, and JSON-LD can be added anywhere on your web page. It’s just a hidden script that search engines read.