Data in the schema.org vocabulary may be embedded in an HTML page using any of three alternative formats: microdata, RDFa, and JSON-LD.
Schema.org can be used with RDFa and JSON-LD, but it is not supported by microformats.
Schema.org markup helps your website rank better for all kinds of content types. There is data markup for…
There are hundreds of markup types — from toy stores to medical dose schedules. If you have any type of data on your website, there’s a good chance that it’s going to have an associated itemscope and itemtype.
A full list of items you can mark up with schema.org is available here.
The following is an example of how to mark up a HTML5 webpage using the schema.org schemas and microdata. In order to mark up the data the attribute itemtype
along with the url of the schema is used. The attribute itemscope
defines the scope of the itemtype. The kind of the current item can be defined by using the attribute itemprop
.
Here are a few notes schema.org suggests you to keep in mind when adding schema.org markup to your web pages.
More is better, except for hidden text. In general, the more content you mark up, the better. However, as a general rule, you should mark up only the content that is visible to people who visit the web page and not content in hidden div’s or other hidden page elements.
Expected types vs text. When browsing the schema.org types, you will notice that many properties have “expected types”. This means that the value of the property can itself be an embedded item. But this is not a requirement — it’s fine to include just regular text or a URL. In addition, whenever an expected type is specified, it is also fine to embed an item that is a child type of the expected type. For example, if the expected type is Place, it’s also OK to embed a LocalBusiness.
Using the url property. Some web pages are about a specific item. For example, you may have a web page about a single person, which you could mark up using the Person item type. Other pages have a collection of items described on them. For example, your company site could have a page listing employees, with a link to a profile page for each person. For pages like this with a collection of items, you should mark up each item separately (in this case as a series of Persons) and add the url property to the link to the corresponding page for each item, like this:
<div itemscope itemtype="http://schema.org/Person">
<a href="alice.html" itemprop="url">Alice Jones</a>
</div>
<div itemscope itemtype="http://schema.org/Person">
<a href="bob.html" itemprop="url">Bob Smith</a>
</div>