benefits

From Microformats Wiki
Revision as of 23:50, 17 November 2008 by AmeerDawood (talk | contribs) (→‎Easy to add)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Benefits of using Microformats

There are many benefits to using Microformats when publishing content on the web. This page provides a summary of some of those benefits.

Don't repeat yourself

With Microformats you can publish a single, human readable version of your information in HTML and then make it machine readable with the addition of a few standard class names.

A common example is contact details: If you wanted to publish human- and machine-readable versions without Microformats you would publish an HTML page containing your contact information and a separate machine-readable vCard file that people could automatically import into their address book software. Your information would be stored in two places making it harder to maintain and easier to get out of sync.

Using Microformats you only publish one version of the data, the human-readable HTML version with a few added class names defined by the hCard Microformat. You could also add a link to an online service to convert your hCard into a vCard file for users to download (Technorati provides a service to do this). When it comes to maintaining your information not only do you only have one copy of it, it's also a copy that you can easily look at in a web browser to see if it's up to date or not.

You already know HTML

If you're publishing information online you already know HTML. Microformats allow you to make that your information machine readable without the need to learn a plethora of other languages.

There are Microformats to mark up contact information, event information and episodic web content. Without these Microformats you would need to learn three extra languages/vocabularies (vCard, iCalendar and Atom) to get the same benefits.

Easy to add

The Microformats design process is built around the idea of "paving the cow paths". That means we aim to support common patterns of behavior so you probably won't have to change that much in your HTML, in most cases it's as easy as adding a few class names to existing elements and a few <span> elements here and there.

Here's a quick example of some contact details in a web page:

  <p>
    For more information call John Smith on 0207 123 123 
    or email <a href="mailto:john.smith@example.org">john.smith@example.org</a>
  </p>

Then we add the hCard Microformat:

  <p class="vcard">
    For more information call <span class="fn">John Smith</span> on <span class="tel">0207 123 123</span>
    or email <a class="email" href="mailto:john.smith@example.org">john.smith@example.org</a>
  </p>

It's easy as that. This wiki even provides some helpful cheatsheets to help you remember the relevant class names.