Join James Williamson for an in-depth discussion in this video Popular syntaxes, part of HTML: Structured Data.
- View Offline
- Before we start adding structured data to our sites I wanna take a brief tour of some of the available syntaxes. It's helpful at first to understand the concept of vocabularies and syntaxes when used in structured data. Vocabularies are used to describe and categorize content, while syntaxes are used to implement them in a page's HTML. In some cases vocabularies and syntaxes are actually independent of each other. GoodRelations for example, the site you're seeing here is a vocabulary that helps describe products and services and can be implemented using whichever syntax you prefer.
Even in instances where syntaxes and vocabularies are tied together, as they are here in Microformats' hCard specification most syntaxes will offer a way to implement any vocabulary using their syntax. And since we were just talking about them, let's start with Microformats. Microformats was one of the first structured data solutions. And it was designed to extend the semantic meaning of HTML without having to resort to an XML-like extension of the language. Microformats are well supported among search engines, and have given rise to many industry standard vocabularies, such as hCard and hCalendar.
A large community continures to extend and refine the Microformats specifcations so they're likely to remain an important part of structured data implementation. RDFa, or resource description framework and attributes, is a W3C specification that adds a set of attributes to HTML for embedding structured data to pages. Originally tied to the development of XHTML, RDFa was eventually modified to apply to almost any markup language including HTML.
RDFa enjoys the stability of being a W3C recommendation and is well supported among search engines as well. Now there are actually two flavors of RDFa. The full RDFa spec and RDFa Lite, which is a smaller subset of attributes that handles most needs and is a little easier to learn. Microdata is a part of the WHAT Working Group's HTML5 specification and is structured around embedding metadata that helps to define existing page content. Microdata uses structured attributes to create name/value pairs that describe content.
Much like RDFa, JSON-LD is a W3C specificaction that has reached recommendation status. So, it's considered stable. However, JSON-LD hasn't been fully implemented by all search engines at this point, but it should be soon. Although it's not actually a syntax, I do wanna take a moment to mention schema.org. Recently, Google, Bing, Yahoo and Yandex came together to create schema.org as a way of standardizing which vocabularies are supported by the major search engines.
Although it's not a specification it does have the backing of all major search engines and has seen quick adoption by many sites. Although schema.org does favor the Microdata syntax in reality it's syntax neutral and offers examples of using the schema.org vocabulary with multiple syntaxes. That was a pretty brief introduction to what is an admittedly complex subject, so if you're a little confused, please don't be concerned. In our next movie, I'm gonna go over a few of the things you should consider when choosing a syntax for structured data.
- Choosing a syntax
- Learning microformats
- Structuring contact data
- Adding contact names, titles, photos, and addresses
- Learning RDFa
- Structuring event data
- Providing event dates
- Adding an event URL
- Learning microdata
- Structuring products
- Setting product pricing
- Adding individual product reviews
- Learning JSON-LD
- Creating a knowledge graph