Most of the information provided on a website is in an unstructured format. This means that bots and AI agents have to make a guess about what that information represents. For example, if a number is presented on the page, how do bots and agents know if that number is a price, phone number, date, or something else?

Most major bots and agents are going to guess correctly that a number is a phone number instead of a date or price by reviewing the context of the page. However, mistakes can be made. As well, even if the bots or agents know that the string of numbers relates to a phone number, the bot or agent may not be clear if that phone number is for the sales department or the support department.

Schema markup code, using the vocabulary on schema.org, is a way to provide more structure to the information presented on the website and avoid any mistakes from the bots and agents guessing what the information represents. With the example of a phone number, you can use schema markup to define that the string of numbers is, in fact, a phone number and that it is the number for the support department.

Along with explaining what the information is, schema also gives you the ability to show how different pieces of information relate to each other. This is the more interesting and important part of using schema markup on your website. You can go beyond simply telling bots and agents that a number is a price, but you can use schema markup to explain how that price relates to a product for sale. More than that, you can use schema markup to explain how that product relates to all other products for sale on your website.

Understanding Schema Markup

Entities, Attributes, and Relationships

There are three aspects to schema markup code: entities, attributes, and relationships.

  • Entity: An entity is the thing being described. This could be a person, an organization, a product, an event, a place, a web page, or any other type of object. Schema.org’s vocabulary contains hundreds of specific types of entities that can be used.
  • Attribute: An attribute is a characteristic of an entity. A person has attributes such as name, phone number, email address, company, city, state, or credentials. Schema.org’s vocabulary has standardized properties for each of these attributes.
  • Relationship: Within the schema markup, relationships can be formed between different entities. An article on a website is written by an author, so the Article entity can be related to the Person entity representing the author. Relationships can also be established externally beyond your website to help bots and agents understand broader connections.

I’m going to focus mostly on entities and attributes in this article. For more about relationships, read my guide to schema entity mapping.

Three Encoding Methods: JSON-LD, Microdata, RDFa

There are three different ways you can write schema markup code:

  • RDFa: RDFa stands for Resource Description Framework in Attributes and is a semantic web standards specification that allows for adding structured data. This is added within the HTML code via HTML attributes. Those HTML attributes include vocab, property and typeof.
  • Microdata: Microdata is part of the HTML standard and provides a way to add metadata directly within the HTML code. Like RDFa, you can use Microdata to add schema markup to the existing HTML on a webpage. Microdata’s attributes include itemtype and itemprop.
  • JSON-LD: JSON-LD stands for JavaScript Object Notation for Linked Data. JSON-LD is separate code added alongside the rest of your HTML code. It is added within <script> tags to the HTML page. Learn more about what JSON-LD is.

While JSON-LD is Google’s recommended format, Google and Bing support markup in Microdata or RDFa formats. Most plugins you can use to add schema markup to your website will use JSON-LD. Microdata and RDFa are relatively rare.

The biggest advantage of the Microdata or RDFa encoding methods is that everything exists within the existing HTML. As a result, all of your content is presented in only one place in the webpage’s code. In contrast, JSON-LD is separated from the main HTML, so any information included in the markup must be listed in two places: once in the HTML and once in the JSON-LD code.

The reason JSON-LD is recommended, though, is that Microdata and RDFa are not as robust or expressive. It is easier to show complex relationship and more detailed information about entities in JSON-LD.

Example Schema Markup

Here’s an example of what schema might look like on a website. This Organization schema describes Elementive. While written in code, it is still relatively easy to read. In this schema markup, you can see Elementive’s name, which defines Elementive as the main entity. The Elementive entity has attributes for email address, website, logo, and phone number. This markup also contains a sameAs attribute, which establishes a relationship between Elementive and additional websites describing Elementive.

This first example is written in JSON-LD. This would be added in addition to the existing page content. It can be placed in the HTML <head> or <body>.

{
  "@context": "http://schema.org",
  "@type": "Organization",
  "name": "Elementive",
  "legalName": "Elementive Marketing Solutions",
  "url": "https://www.elementive.com",
  "logo": [
    "https://www.elementive.com/data/uploads/ems-logo-150x150.png"
  ],
  "address": {
    "@type": "PostalAddress",
    "addressLocality": "Centennial, CO",
    "postalCode": "80112",
    "streetAddress": "8200 S Quebec St., Suite A3293"
  },
  "email": "[email protected]",
  "contactPoint": [
    {
      "@type": "ContactPoint",
      "telephone": "+1-720-441-3591",
      "contactType": "customer service",
      "areaServed": "US"
    }
  ],
  "sameAs": [
    "https://www.linkedin.com/company/elementive/",
    "http://twitter.com/elementivesltns",
    "http://www.slideshare.net/Elementive",
    "http://www.youtube.com/c/ElementiveMarketingSolutions"
  ],
  "founder": [
    {
      "@type": "Person",
      "name": "Andrea Streff",
      "jobTitle": "Technical Consultant"
    },
    {
      "@type": "Person",
      "name": "Matthew Edgar",
      "jobTitle": "Technical Consultant"
    }
  ]
}

Here’s an example of schema markup using Microdata. In this example, you’ll see the HTML attributes of itemtype (describing entities) and itemprop (describing attributes) within the HTML tags.

<div class="loc_address">
  <a class="address">
    <div class="icon_nav_wrapper">
      <i class="icon-nav" data-nav="1234 W. Test Dr., Littleton, CO 80123"></i>
    </div>
    <div itemscope itemtype="http://schema.org/PostalAddress" class="address_wrapper">
      <span itemprop="streetAddress" class="address">1234 W. Test Dr.</span>
      <br>
      <span itemprop="addressLocality" class="loc_city">Littleton</span>,&nbsp;
      <span itemprop="addressRegion" class="loc_state">CO</span>
      <span itemprop="postalCode" class="loc_zip">80123</span>
    </div>
  </a>
</div>

Finally, here is an example of schema markup in RDFa. As you can see, this is similar to Microdata but with different attribute names.

<div class="loc_address">
  <a class="address">
    <div class="icon_nav_wrapper">
      <i class="icon-nav" data-nav="1234 W. Test Dr., Littleton, CO 80123"></i>
    </div>
    <div vocab="http://schema.org/" typeof="PostalAddress" class="address_wrapper">
      <span property="streetAddress" class="address">1234 W. Test Dr.</span>
      <br>
      <span property="addressLocality" class="loc_city">Littleton</span>,&nbsp;
      <span property="addressRegion" class="loc_state">CO</span>
      <span property="postalCode" class="loc_zip">80123</span>
    </div>
  </a>
</div>

How to Start Using Schema

Schema.org vs. Google’s Supported Search Features

There are many different types of schema that you can use on your website. Schema.org contains a full vocabulary of different types of schema markup available, representing a wide range of topics. Within the different schema types, there are many different properties available, providing a wide choice of attributes to include when describing entities.

However, not all schema types available on schema.org are supported by Google and Bing. Supported schema types may influence search rankings. For example, adding schema to a discussion forum may enhance threads shown in search result rankings by adding the date posted or information about interactions with that thread (learn more about schema for discussion forums). Adding schema to a product may add review and rating information to the ranking (learn more about review/rating schema).

A few things to keep in mind:

  1. All ranking enhancements are completely optional. Even correctly written code following the specifications from Google or Bing may not alter the ranking’s appearance.
  2. Google and Bing provide details about which schema types they support and which properties they support for those different types. These do change somewhat often, so monitoring these guidelines for new opportunities should be part of your regular SEO maintenance.
  3. Finally, there is no harm in using schema types or properties that aren’t specifically supported by Google or Bing. In fact, these additional types and properties may help in other ways. For example, many suspect that schema may influence AI search.

What Schema Should You Use?

If you don’t currently use schema on your website, my recommendation is to start by adding Organization schema to your website’s homepage. At a minimum, use Organization schema to define your company’s name, address, logo, and contact information. This can be added through plugins in WordPress. Or, to keep it simple as you start using schema, you can manually write the schema code. TechnicalSEO.com has a great schema builder that can help in this process.

Once you have Organization schema in place, the next step is to select Google’s supported schema types that are most applicable to your website. This will typically overlap with what Bing supports as well. For example, if your website sells products, follow Google’s documentation to add Product schema to your website. Or, if you have a blog, you can add BlogPosting schema to the blogs on your website. You can use the required properties indicated by Google.

For WordPress sites, there are many plugins that can simplify these initial steps, including RankMath, Schema Pro, Yoast, and more. I don’t have an official recommendation. There are many good options, so find the plugin that works best for your situation.

As schema is added to the website, be sure to test the schema and monitor for common problems that may arise. I have a separate guide walking through how to find and fix schema issues.

After you have the basics in place, you can start to expand from there with additional types of schema, including schema types that Google and Bing do not explicitly support. Note that expanding beyond the basics can require adding custom code to a website since not all plugins or CMS platforms will support adding various niche schema types or properties that you may want to use.

Need Help?

Do you need help using schema markup on your website? Contact me and let’s talk about how to utilize schema within your SEO and GEO efforts.

Prefer a more DIY approach? Order my book, Tech SEO Guide, a reference guide to help you address schema and other technical SEO issues on your website.