Semantic Markup: How to feed Google Rich Snippets & Yahoo SearchMonkey with RDFa and Microformats

The game sure is changing.  Though it often feels like a captor-hostage situation, and for some accompanied by a kind of Stockholm Syndrome, Google and its nearly pathetic (if precedent) runners-up in the search market have opened up new ways of tweaking your site’s presentation in their search results.  It used to be that all you could customize was the title and the description snippet, simply by writing a smart title tag and an even more enticing meta description tag, but that was it.

If you haven’t heard of Yahoo’s Searchmonkey project, well now you never will because the great behemoth of underpaid, overworked and perpetually-pampered Python programmers of Mountain View have done roughly the same thing Yahoo started a year ago , just for 80% more users than Yahoo’s ever going to have.  They call it Rich Snippets.

Like Searchmonkey, Google’s Rich Snippets give any webmaster the opportunity to provide value-added information with their site content which defines the relative meaning to humans of the various kinds of information on your web page, with movie reviews being one classic example of a common type of content with conventional components found on most movie review sites such as MPAA rating, average user review ratings, runtime, start date, title, description, studio, director, top billing actors, onesheet thumbnail, etc.  But unlike Searchmonkey, you and the other 4/5ths of the world are actually going to use Rich Snippets. Here’s why:

As of Tuesday, the largest search engine in the known universe has made official their support for both microformats and RDFa, all in an effort to help the Great Spyder divine the intent behind your jumbled mess of non-compliant HTML, rather than make her Great Guess based on your keyword-stuffed marketing copy.  This is yet another way to get traffic from Google (or preclude it to your own detriment, if you give too much away before the click) by playing the game with them, but in this case it’s not only a good idea, it’s easy.

In fact, it’s so ridiculously easy to do, you may already be specifying microformats without realizing it.  Yes, if you happen to have logically and hierarchically-labeled CSS classes with good names or a few choice HTML tag title attributes, you’re already on your way to semantic zen, which is actually an oxymoron, which is semantic zen.  Ah So!

But that would be a tremendous stroke of luck having named your CSS just right so as to accidentally specify a microformat for it, so it’s probably a good idea to read up on the specifications.  So which method should you use, microformats or RDFa?

They’re so similar that their differences are, quite frankly, annoying.  See this article for a tabulated breakdown of the differences between the two, which pretty much cancel each other out.

Back before Blu-Ray became the official high-def movie-on-optical-disc format for everyone but Xbox360 owners, if you couldn’t wait for the format shakeout and grew tired of staring at your Rolex all day while the standards bodies endlessly debated themselves, you either bought both Blu-Ray and HD-DVD players, or some kind of frankenbox with both lasers.  Unfortunately this is where semantic markup currently stands, but unlike video formats, there’s no time to wait around while they decide.  The second mouse gets the cheese, folks.

This is precisely why I’ve always recommended implementation of both formats simultaneously using class attributes with microformat names and property attributes for the RDFa markup, such that Google’s examples of either method would combine to look like this (with microformat markup in green and RDFa markup in blue):

<div class="vcard" xmlns:v="" typeOf="v:Organization">

   <span class="fn org" property="v:name">L'Amourita Pizza</span>

   <span class="tel" property="v:tel">(206) 555-7242</span>

   <div class="adr" rel="v:address">

      <span class="street-address" property="v:street-address">2040 Any Street</span>

      <span class="locality" property="v:locality">Springfield</span>

      <span class="region" property="v:region">WA</span>

      <span class="postal-code" property="v:postal-code">98102<span>


Not too painful, and covers all the bases.  But what about CMS-driven sites?

There is an active effort underway for several CMS’s and blog platforms, but  without getting into every possible one, I’ll offer that Wordpress theme designers can hack microformat markup directly into their theme but the smarty pantses at Structured Blogging have WordPress and MoveableType blogs covered with a fine pair of plugins, and SquareCows has published a perfect little RDFa plugin for WordPress.

As the semantic web continues to evolve, ever logarithmically, I’m sure we’ll see a unified standard emerge for marking up meaning as the search engines continue to mutate into something more alien, and more useful, than most of us can even envision without prescription cognitive enhancers and a VC firm breathing down our necks.

Tags: , , , , , , ,

You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

AddThis Social Bookmark Button

Leave a Reply

You must be logged in to post a comment.