Google’s Preferred Structured Data: JSON-LD Vs Microdata

Google uses structured data to better understand what a webpage is about by categorizing the topic, identifying important parts of webpages like logos and images, and displaying webpages prominently at the top of the page.

There are several types of structured data, but only one is preferred by Google, so it’s important to use the right format.

Contents

Advertising

What types of structured data does Google support?

Google supports three types of structured data:

  1. JSON-LD.
  2. Microdata.
  3. RDFa.

Each of these standards is a different way of communicating structured data and is specified on the official Schema.org website.

Screenshot of Schema.org structured data examplesScreenshot by author, May 2022

In the image above, we can see that the Structured Data Example Schema.org provides examples in three formats.

There are three tabs. Each tab corresponds to a different form of structured data: Microdata, RDFa, and JSON-LD structured data.

What is Microdata Structured Data?

Microdata is a way to add metadata to HTML code and is part of the HTML specification, also known as the WHATWG (Web Hypertext Application Technology Working Group) HTML standard.

Microdata is an HTML specification for marking up a web page within the HTML code itself.

It is basically metadata that is placed in the HTML code that is published in tags and is readable by machines like Googlebot.

Schema.org, the nonprofit organization that creates structured data specifications, has published a structured data explainer called Getting Started and have used microdata in all of their examples.

Thus, microdata remains a valid means of communicating structured data and is currently supported by the standards body Schema.org as well as Google (except in specific cases where it is explicitly not supported).

Microdata is embedded in existing HTML like this:


In the code above, microdata called “itemprop” is inserted to specify the structured data property, in this case, the breadcrumb structured data property.

Here’s what that code looks like without the microdata structured data:

There are other ways to do the same thing using the BreadcrumbList structured data type as well.

What is RDFa Structured Data?

RDFa is an acronym for Resource Description Infrastructure in Attributes. It is an extension of HTML.

The reason it’s called an extension of HTML is that it extends HTML.

Google describes RDFa like this:

“Microformats specify both a syntax for including structured data in HTML documents and a set of microformats classes, each with its own specific vocabulary of allowed attributes.

RDFa, on the other hand, only specifies a syntax and lets you use existing attribute vocabularies or create your own.

It even lets you freely combine multiple vocabularies. If the existing vocabularies do not meet your needs, you can define your own standards and vocabularies by creating new fields. »

RDFa offers an additional way to communicate structured data to Google that is less intrusive to code than the microdata method.

Like microdata, RDFa is currently specified as a valid form of data by Schema.org and is currently supported by Google (except where not explicitly specified).

This is what a breadcrumb structured data might look like in RDFa format:

What is JSON-LD?

JSON-LD is a scripting language that allows publishers to communicate important information to search engines.

JSON-LD is a crazy JavaScript Object Notation acronym for Linked Data.

As it is a script, it is relatively easier to use than Microdata and RDFa because JSON-LD is not embedded in the HTML CODE as metadata or as an extension of the HTML code itself .

JSON-LD can be placed anywhere on a webpage, even in the Head section of the webpage’s code, where metadata usually goes.

JSON-LD can also be placed at the end of the code or in the content section of the code (it will not be visible to site visitors).

Another advantage of JSON-LD is that because it is separate from HTML and exists in its own script, it can be easily edited and revised.

A breadcrumb list structured data markup might look like this:

 

Troubleshooting script completely separate from HTML is so much easier than trying to encode structured data into HTML, which is how Microdata and RDFa are done.

According to the JSON-LD website manager:

“The data is messy and disconnected. JSON-LD organizes it and connects it, creating a better web.

It’s a way to create a network of standardized, machine-readable data on websites. »

JSON-LD scripts can be added to a webpage in a way that can be modeled into a website, making it easy to add, update, and remove.

The official Schema.org Structured Data Specification can be found at Schema.org (surprise!).

What type of structured data does Google prefer?

Even though Microdata continues to be supported by the standards organization Schema.org, what matters is which version is supported by Google.

In a Google Office-hours Hangout from March 2019, a participant asked the following question:

“What type of schema markup is better for Google?” Should I use Jason or… microformats? Which format is preferable? »

John Mueller replied:

“We currently prefer JSON-LD markup. I think most of the new structured data that somehow came out for JSON-LD first. So that’s what we prefer.

Google prefers JSON-LD structured data

Google’s John Mueller made it clear that Google prefers JSON-LD structured data.

One of the advantages of JSON-LD structured data is that it is non-intrusive.

It is non-intrusive as it keeps structured data separate from HTML code.

This makes reading, troubleshooting, and updating structured data much easier because it’s simpler to implement and manage.

Additionally, the JSON-LD scripting language follows an easy-to-learn set of rules and can easily be added or removed from a site.

How to Implement JSON-LD Structured Data

The Official Structured Data Schema.org JSON-LD Schema.org website contains many examples of how to write structured data code. Just take an example and use it as a template.

Here is an image of an example without structured data:

screenshot of content without structured dataScreenshot by author, May 2022

Here is an example of the same expressed content as JSON-LD Schema.org structured data:

Screenshot of json-ld structured data from schema.orgScreenshot by author, May 2022

Google prefers JSON-LD structured data

Google’s preferred format for structured data is JSON-LD.

Because it’s Google’s preference, it’s a good idea to ensure that all structured data used in a web page uses JSON-LD and not the JSON-LD structure.

Watch the Google Webmaster Office-hours Hangout at the 22:33 minute mark:

More resources:


Featured Image: Helder Almeida/Shutterstock

Leave a Comment