chapter eight

Using Microdata

This chapter focuses on how you can use advanced markup syntax to enable computer programs to understand the data presented in your web pages. The web is full of structured data—the details of a local business, the properties of an item for sale on an e-commerce website, or someone’s profile information on a social networking site. All of these examples follow a structured data model. The problem is that when this data is displayed on a web page, it’s difficult for computer programs to make sense of it. For a long time there was no set specification for how data should be presented or how markup could be used to help make your web pages more meaningful to computer programs. Microdata changed this.

Microdata aims to bring structured data models into our web pages by enabling developers to define, use, and share schemas that outline the structure of their data. Think of these schemas as templates of items. They define all the properties that an item could have. A simple schema for a human, for example, would have properties such as height, weight, eye color, hair color, and age.

Enabling computer programs to extract data from your web pages opens up a realm of new possibilities to developers. It allows developers to build web applications that can interact with each other without necessarily needing to know the specifics of how the other application is built. For example, Google has already started looking for microdata when it crawls web pages and ...

Get HTML5 Foundations now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.