Schema.org is an initiative of Google, Bing, and Yahoo that aims to help search engines better understand websites. It was created in 2011 with the aim of saving work to webmasters and get data from different search engines were consistent with each other.
The system provides different schemes of special terms and HTML tags, known as schemas (diagrams), which allow search engines to better understand the content of the site and provide the same detailed information. These are inserted into the HTML code, using microdata format; that was introduced with HTML5.
What Is Microdata And Why Use It?
Microdata is a specification that allows nested HTML metadata in the contents of a website. Browsers, search engines web crawlers and take this information to provide the better user experience.
If used properly, it can significantly improve the SEO of a site. Because search engines favor sites that facilitate the indexing process. Schema.org offers a standard vocabulary used in the microdata and other formats such as RDFa semantic web and JSON-LD.
To better understand how we used microdata to optimize the HTML code, talk about the movie The Lord of the Rings. First, let's see how our code would look without microdata:
- <H1> The Lord of the Rings </ h1>
- <Span> Director: Ralph Bakshi </ span>
- <Span> Science fiction </ span>
- <a href="/../trailers/lord-of-the-rings.webm"> Trailer </a>
The first step is to identify the code block that contains the information about the movie and add the item scope property in a label containing all the elements. In addition, you must specify the type of information we are pointing item type, in our case Movie.
- <Div itemscope itemtype = "http://schema.org/Movie">
- <H1> The Lord of the Rings </ h1>
- <Span> Director: Ralph Bakshi </ span>
- <Span> Science fiction </ span>
- </ Div>
Thanks to these tags, the search engines will know that part of your site tells of a movie. Now, we will give more details about the item prop element.
Each item type has special properties that allow us to provide more detailed information. In this case, for example, we could use genre, director, and name.
- <Div itemscope itemtype = "http://schema.org/Movie">
- <H1 itemprop = "name"> Lord of the Rings </ h1>
- <Span> Director: <span itemprop = "head"> Ralph Bakshi </ span> </ span>
- <Span itemprop = "genre"> Sci-Fi </ span>
- </ Div>
So search engines will know what we mean and, in this way, use this information to tell interested users can find this information on our website. And, most importantly, bring them to the right section.
The idea is to label all possible information on our site. However, the rule is visible only to do with the information. Otherwise, search engines will believe you tried to cheat on the SEO and heavily penalized in the rankings.
Another important point is used as specific as possible properties. And as we saw in the example, these are organized from the general to the particular. You can view the complete list of properties to be sure to provide as much information as possible.
And to give us more life, Google offers a tool called Structured Data Testing Tool that allows us to validate all tags or a complete website a code segment. So if you did something wrong, you know the error and how to fix it. Our example looks like this when we analyze: