Microformats, Making your Content a Little More Useful

Microformating is a tidy new way to markup your XHTML content making it more useful for consumption by machines.  The markup is designed to sit on top of your existing XHTML so there is no visual difference, as defined on microformats.org, they are ‘Designed for humans first and machines second, microformats are a set of simple, open data formats built upon existing and widely adopted standards’.

Practical example - hcard

Take the following code, a fairly standard method of marking up a contact name with a link to their website.

<ul>
<li>
<a href="http://www.coffeerings.co.uk">
John Walker
</a>
</li>
</ul> 

Using microformatting we can extend the markeup to provide much more meaning without changing the original output. The following addition of the 'class' attribute will alert any microformat reader that the hCard belonds to the 'John Walker' and that their website is 'http://www.coffeerings.co.uk'.

<ul>
<li>
<a href="http://www.coffeerings.co.uk"
class="url fn">
John Walker
</a>
</li>
</ul> 
  • 'url' relates to the 'a' tags 'href' attribute.
  • 'fn' relates to the value of the 'a' tag.

More Information

http://microformats.org/
http://microformats.org/wiki/hcard-cheatsheet

More from this section

RECENT PERSONAL WORK

AllTradeArt Case Study
Kwik Travel Case Study
Allotment Case Study
Revolutionshirts Case Study

RECENT ARTICLES

Import Error: No module named django.core.management

Installing and testing the Django Framework on my new mac I came acro... read more

Quick Note on Setting Up a Mail Server

Part of the basics when setting up a mail server but I needed to put ... read more

Microformats Creator Tool

"Microformats are a way of adding simple markup to human-readable... read more

Recursive Directory Listing

Nothing too fancy but a nice way of viewing a directory tree on your ... read more

CREDITS

powered by php-wax the php framework