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:

  • Microdata
  • RDFa

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.

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?

JSON-LD (JavaScript Objective Notation for Linked Data) is a structured data format for marking up your website and supported by the biggest search engines Google, Bing and Yandex. It’s Google’s recommended method of implementing structured data.

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

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.

Original HTML.

Original HTML

With Microdata markup.

HTML With Microdata Markup

We can see it begins with:

Example 1

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.

Example 2

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 Code Example

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.”

RDFa Example 2

Next we markup all the information with property tags.

RDFa Example 3

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.

Talk directly to the owner, not a salesman.

Not sure where to start? That’s ok. Give me a few minutes of your time to discuss your current problems and I will help you identify solutions.