Thursday 10 December 2009

Using Microformats for events


As you browse around the web you might have noticed the above icon , if not, from now on I guarantee you will spot it every where you go.

That icon is the sign of a microformat - the convention of marking up your event listing so that your users can download all event details at a click of a button and add it to their own calendar.

If you want to find out if any of the sites you frequent use microformats then I'd recommend using the Microformats bookmarklet which enables you to check any web page for event details (or, to use their technical names, hCalendar) and then download them for yourself.

For example, if I'm interested in attending a concert that is listed on lastfm.com then I just click my bookmarklet and I can download the event listing (hCalendar) and add it to my Google Calendar, iCal or Outlook calendar (whatever I use).

If you don't use the bookmarklet then you can also use the download link that is usually next to the hCalendar. Last.fm use a link that says "Export event" which shows me I can download it and add it to my calendar.

How can you make sure that your event listing uses the right conventions?? Well, the good people at Microformats.org have built a hCalendar generator which will give you the code to make sure that your event is downloadable. If you are interested in learning how to write the code for microformats yourself then try Microformats.org/wiki/hcalendar has lots more details.

Microformats can also be used to create contact details (hCard) and reviews (hReview). For best effect you could create a hCalendar for your event listing and a hCard for your venue or booking agent.

Now, microformats aren't just for your users. They can benefit your site in other ways too. Because you are using a common convention it means that when search engines like Google index your website, they don't just see the event details as letters and numbers, but they can understand that it is a event listing with a title, venue, date and time.

That is known as the semantic web, giving your data meaning. If you want to read more about the semantic web then I recommend that you read Semantic web and Microformats or Microformats and semantic technologies.

No comments:

Post a Comment