Examples and guidance: How does structured data work?

Do you want to benefit from rich snippets and higher click-throughs through the use of structured data? In this article, we take a closer look at how structured data works with a number of examples.

Structured data is a kind of reading aid for search engines. It makes it easier for Google and Co. to assign content correctly. In addition, you also create the conditions for rich snippets.

These special types of search results stand out from conventional search results with information such as opening hours, contact addresses and preparation time.

This means more attention and higher click volumes. We also recommend working with structured data so that your content ends up in knowledge graphs.

It is important that you start by familiarising yourself with how structured data works.

Tasks of structured data: Examples

Search engine crawlers are advanced programs. Nevertheless, reading pages is a complex process. With the help of structured data, you can make this process easier.

For example, you can use structured data to tell Google that a sequence of numbers is a telephone number or that a section of text is an address. 

The great thing for you as a site owner or operator is that structured data enables so-called rich snippets, i.e. search results that are enhanced with additional information. 

In this example, information is provided about a recipe and an image:

Example recipe SERP with structured data

Rich snippets are more attention-grabbing than normal search results and therefore lead to a higher number of clicks. 

Structured data is important for SEO. Although they do not represent a classic ranking factor, they often lead to increased click volume. 

Formats for structured data – examples and variations

There are three different formats in which structured data can be represented:

<script type="application/ld+json">
    {
      "@context": "https://schema.org",
      "@type": "Event",
      "name": "Three Live Bunnies",
      "startDate": "2023-07-21T19:00-05:00",
      "endDate": "2023-07-21T23:00-05:00",
      "eventAttendanceMode":
"https://schema.org/OfflineEventAttendanceMode",

      "eventStatus": "https://schema.org/EventScheduled",
      "location": {
        "@type": "Place",
        "name": "Easter Garden",
        "address": {
          "@type": "PostalAddress",
          "streetAddress": "Roadway Road",
          "addressLocality": "London",
          "postalCode": "SE1 1WE",
          "addressRegion": "London",
          "addressCountry": "UK"
        }
      },
      "image": [
        "https://example.com/photos/1x1/photo.jpg",
        "https://example.com/photos/4x3/photo.jpg",
        "https://example.com/photos/16x9/photo.jpg"
       ],
      "description": "Finally live in the Easter Garden. Happy Moods with the Three Live Bunnies.",

      "offers": {
        "@type": "Offer",
        "url":
"https://www.example.com/event_offer/12345_201803180430",
        "price": "30",
        "priceCurrency": "USD",
        "availability": "https://schema.org/InStock",
        "validFrom": "2024-05-21T12:00"
      },
      "performer": {
        "@type": "PerformingGroup",
        "name": "Three Live Bunnies"
      },
      "organizer": {
           }
    }
        "@type": "Organization",
        "name": "Bunny Music",
        "url": "https://example-bunnymusic.com"
      }
    }

Microdata

Microdata works with HTML5 information types. They are mostly used in the body but can also be embedded in the head. Microdata is the oldest of the three formats and is only rarely used today. 

RDFa

This HTML5 extension is used in the head and the body. It can also be used to mark up SGV and XML files and combine different types of vocabulary.

Tip: If you want to enter structured data for Google, we recommend that you always use JSON-LD. 

How to create structured data

There are several ways to create structured data. As you might have guessed, they all have their advantages and disadvantages. 

Manual insertion

This method involves pasting the code directly into the source code, and there is no need for any additional tools. However, you have to do everything yourself for each individual page. 

Use a generator

A generator such as the Schema Markup Generator or the JSON-LD Generator creates the code for you after you have entered the required information. This is a more convenient, time-efficient method.

The disadvantage of this method is that, as a general rule, not all types of structured data can be created with generators that are available free of charge. In addition, the guidelines for structured data change frequently, and generators are not always up to date. 

Use plug-ins

The whole thing is even more convenient if your site runs with a CMS like WordPress, as you’ll have plugins at your disposal that automatically mark up structured data.

Google Tag Manager

You can also add structured data to pages using Google Tag Manager. To do this, you do not have to intervene in the source code and can trigger the script on several defined pages.

However, the Googlebot then has to read the code through JavaScript. This is why John Mueller from Google advises manual insertion. 

Image of a Tweet

Markup help from Google

Finally, there is Google’s markup helper. Call up a URL or paste HTML code into the field provided. You can then mark up the required information and Google will create a code, either in JSON-LD or microdata format. 

Download or copy and paste the code into your website. Again, there is no way to avoid having to manually insert the code, which Google generates for you. 

Image of the structured data markup helper

Google Data Highlighter

If you want to use structured data for products, films or a local business, for example, you can use the Google Data Highlighter. It can be used to mark up and tag data fields on webpages. However, the tool only works for certain types of data.

Important: Remember to test the code for errors. Google has its own test tool for structured data. This tool does not just tell you whether your code snippet is correct; it also provides specific indications of errors. 

The rich search results status reports also let you know which rich search results Google can read from your page. 

Tips for creating and using structured data

When creating structured data for Google, take a look at the “General Guidelines for Structured Data“.

Note, among other things:

  • Only create structured data for content that readers can see on the page
  • Make sure that your code has all the information it needs. The more recommended (optional) elements you include, the better – but only if they are correct. 
  • The content that you mark up must be a “true representation of the page content”. What does this mean for structured data? As an example, Google cites a live streaming website for sporting events that labels broadcasts as local events.
  • Several elements on a page can be marked with structured data. You can specify each of them as a separate block or ‘nest’ them, as Google calls it, i.e. group them under one main element. 

The latter would look like this, for example:

<html>
  <head>
    <title>How to prepare vegan Chilli zu</title>
    <script type="application/ld+json">
    {
      "@context": "https://schema.org/",
      "@type": "Recipe",l
      "name": "Vegan Chilli Recipe": "A wonderful recipe for a meat-free Chili. Enjoy this simple recipe.",
      "aggregateRating": {
        "@type": "AggregateRating",
        "ratingValue": "4.7",
        "ratingCount": "123"
      },
      "video": {
        "@type": "VideoObject",
        "name": "How to make vegan chilli",
        "description": "Prepare vegan chilli with this simple recipe",
        "contentUrl": "http://www.example.com/video123.mp4"
       }
    }
    </script>
  </head>
  <body>
  </body>
</html>

Conclusion

Structured data is a valuable ingredient for search engine optimisation that you should not do without, provided that it fits your content. 

Various tools are available for creating and inserting structured data. You don’t need any programming skills and you usually don’t have to deal with schema.org.  

Note: To really benefit from all the advantages, test structured data. Examples and test tools from Google will help you to proceed correctly. 

Steve Paine
21.02.2022