>> GreenByte.info By Nick Tong (quiksilv) | Supported by: TalkWebSolutions.co.uk

Microformats are cool

I've talked about microfomats (MF) before but today I've started using them in anger, and man they are cool. If you don't have a microformat client (such as operator ) then you might not see the fun.

Take, for example, a web page that displays your contact details, or a list of contact details, your MF client can export contacts straight into your CRM system such as outlook.

Lets look at an example of creating a hCard for a contact page. Hcard is the MF contact format.

<div id="Nick-Tong" class="vcard">
   <a class="url fn" href="http://succor.co.uk">Succor</a>
   <div class="org">TalkWebSolutions</div>
   <a class="email" href="mailto:myEmail@email.com">myEmail@email.com</a>
   <div class="adr">
   <div class="street-address">My Villa</div>
   <span class="locality">Hove</span> ,
      <span class="region">East Sussex</span> ,
      <span class="postal-code">bn3 3DD</span>
      <span class="country-name">UK</span>
   </div>
<div class="tel">+44(0)1273 589653</div>
</div>
So there's not a lot of extra coding here really. All we're doing is adding classes to our display. The most important classes are 'vcard' and 'fn'.

Download the MF client, add the above code to a HTML page and view. You will see the contact bar highlight with various options. Click here to preview.

What other microfomats are people getting a buzz from?


 

Related Blog Entries

Comments
nick tong's Gravatar FYI: I have a couple of links on my cheat sheets page (http://www.succor.co.uk/index.cfm/2006/3/21/a-web-...) for microformats but this one is great:
http://www.ilovejackdaniels.com/cheat-sheets/micro...
# Posted By nick tong | 17/03/07 13:14 | Report abusive comment
BlogCFC was created by Raymond Camden. This blog is running version 5.5.1.