What Is Microdata?

Microdata is a widely used method for adding structured data to a webpage. Search engines use this data to better understand the content, influence how it ranks in search results, and determine whether it qualifies for rich results.

Microdata adds the structured data directly to the page’s HTML code. For example, the Schema markup below is created using microdata. It informs search engines that the article’s title is “How to Bake a Cake” and that it was authored by Alison Doe.

<article itemscope itemtype="https://schema.org/Article">
  <h1 itemprop="headline">How to Bake a Cake</h1>
  <p>By <span itemprop="author" itemscope itemtype="https://schema.org/Person">
    <span itemprop="name">Alison Doe</span>
  </span></p>
</article>

Similarly, the microdata below provides search engines with Alison Doe’s photo, image, phone number, and contact address.

<div itemscope itemtype="http://schema.org/Person">
  <span itemprop="name">Alison Doe</span>
  <img itemprop="image" src="alison-doe.jpg" alt="Alison" doe>
  <div itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
    <span itemprop="streetAddress">123 Main St</span>,
    <span itemprop="addressLocality">New York</span>,
    <span itemprop="addressRegion">NY</span>,
    <span itemprop="postalCode">10001</span>
  </div>
  <span itemprop="telephone">(123) 456-7890</span>
</div>

Microdata is one of the three main formats for adding structured data to your webpages. The other two are JSON-LD and RDFa. Google recommends you create your structured data using JSON-LD. If you cannot use that, then you use microdata. You should only use RDFa when you cannot use JSON-LD or microdata. 

Importance of Microdata

Microdata is a format for adding structured data to a page. Structured data helps search engines to better understand the page’s content. They also allow search engines to index and rank the content appropriately.

This makes them crucial to bloggers who want to rank on search results pages, as they improve their content’s chances of attracting organic results from search results pages. 

Microdata also allows bloggers to get their content displayed as a rich result. Rich results are the enhanced listings displayed on search results pages. Search engines, including Google and Bing, require bloggers to include structured data in the content they want to consider for rich results. 

Microdata vs JSON-LD

Microdata and JSON-LD are two common formats for embedding structured data into a webpage. Microdata is integrated directly into the <body> tag of the page’s HTML code. This causes it to be intertwined with the page’s code, which makes it considerably complex to manage. 

JSON-LD, on the other hand, is inserted within a <script> tag, which is typically placed within the <head> tag of the HTML code. This keeps it distinct from the visible content, making it easier to create and manage.

Many bloggers and search engines, including Google, prefer JSON-LD structured data for this reason. Google even recommends that bloggers use JSON-LD for their structured data and that they should only use microdata when they cannot use JSON-LD.

Benefits of Microdata

While microdata is not the web’s first choice, many bloggers still prefer it over JSON-LD or RDFa for their structured data. This is typically due to the practicality reasons listed below. 

1 It Integrates Directly Into the Content

Microdata directly embeds into the page’s HTML code. This makes it highly visible and tightly integrated with the rest of the page’s content. This is helpful when you want to associate the structured data with specific elements on the page.

2 It Is Supported by Older Systems and Websites

Some legacy websites and content management systems (CMS) do not support JSON-LD. Such systems will have to use microdata. Otherwise, their users would be unable to add structured data to their content. 

3 It Does Not Depend on Javascript

Microdata does not require JavaScript to function. This means it does not rely on the search engine’s ability to process JavaScript. 

While popular search engines like Google and Bing support JavaScript and JSON-LD, other search engines may not support or process JavaScript accurately. These search engines may also prefer some formats over the more supported JSON-LD.

Disadvantages of Microdata

Microdata has some disadvantages over other structured data formats, especially JSON-LD. We have listed some of them below. 

1 It Clutters the HTML Code

Microdata requires you to add multiple attributes to your HTML code. This bloats your HTML code and makes it harder to read and maintain. It also mixes the structured data with the page content, which can cause confusion during debugging and editing. 

2 It Is Difficult to Update or Reuse

It is hard to use the same microdata across multiple pages. If you want microdata that already exists on one webpage on another, then you would have to create it from scratch. This slows publishing time and can lead to errors and inconsistencies. 

3 Google Prefers JSON-LD Over Microdata

Google officially recommends using JSON-LD for structured data whenever possible. While Google supports microdata, it may not receive the same level of support. 

There are also concerns about future updates and support. This means bloggers and developers who continue to use microdata may miss out on some newer features or improvements. 

4 It Has Limited Support

Microdata does not receive the same level of support as JSON-LD within the WordPress ecosystem. Most Schema plugins only support JSON-LD and not microdata. Other plugins that support microdata have not been updated in years.

If you insist on using microdata, then you will either have to hand-code the relevant Schema into your content or get a developer to do it for you.

🇫🇮 Suomi