HTML5 Zone is brought to you in partnership with:

John Esposito edits Refcardz at DZone, while writing a dissertation on ancient Greek philosophy and raising two cats. In a previous life he was a database developer and network administrator. John is a DZone Zone Leader and has posted 320 posts at DZone. You can read more from them at their website. View Full User Profile

Manage HTML5 Microdata in Drupal

  • submit to reddit

From the developer's point of view, websites want basically two things: lots of readers, and easy maintenance.

Content Management Systems make websites easy to maintain -- by storing structured data separately from generated markup. 

Microdata makes websites easy to find -- by performing roughly the complement of the CMS' job, i.e., by putting structure back into markup.

One is the ying to the other's yang (not sure which is which), so this recent article on IBM DeveloperWorks (awesome site, by the way) just makes a whole lot of sense.

'Combine Drupal, HTML5, and microdata', by Lin Clark, delivers exactly what the title promises. Lin's summary:

With Google, Yahoo, and Bing's announcement of, microdata is quickly gaining ground as a way to create applications that rely on data from many different websites. In this article, learn how to use Drupal to add microdata to your pages. Easily make your content available for use in applications such as Google's Rich Snippets.

The article doesn't worry about's close ties to the three big search engines (though it does drily name them a 'triumvirate'), because its approach is very practical: since, in fact, most people use Google (plus Bing and Yahoo), make your CMS generate sites that Google (and Bing and Yahoo) can find. Here's how they explain the present situation: is a vocabulary that works well with microdata. Because no approval body is in charge of vocabularies, the search engine owners were able to devise their own vocabulary to meet their needs. Most of the vocabulary deals with the kinds of things Google already focused on for its Rich Snippets: people, places, events, entertainment, and commerce.

Drupal 7 includes a module for microdata, so why not use it? (Drupal doesn't support it yet, but it seems to work straightforwardly enough.)

The DeveloperWorks article includes a large dump of excellent links to related resources, many of which are worth saving for review even after you've finished setting up Drupal's microdata functionality. So read it, and lead more people to your site with just a few clicks more.