Introduction to Microformats + a look at hCard & hAtom

September 28, 2006 | Published in: Web design & development | Tags: , , , , , 6

MicroformatsRecently ‘Microformats’ has been a major buzz word in the web design community, but what are they all about? If you are feeling lost then this article is for you. This article explains what Microformats are, the benefits of using microformats, and how to implement them.

This article focus’ on the microformats hCard, and hAtom; both of which are used on the Blue Anvil site if you hadn’t noticed.

What are Microformats?


Microformats, quite simply, are a set of open data formats for representing data, based on existing technologies and standards, used for solving specific problems.

They are “Designed for humans first and machines second”, and semantically enhance the content of your website. For example, you can use a microformat to represent contact information (using hCard), reviews (using hReview), blog entries (hAtom), and relationships with other people (XFN). This content can then be read, and understood, by applications, search engines, and other sites making Microformats potentially very powerful.

Microformats don’t require any advanced code to use, they simply utilise existing markup by adding class names and attributes, making them very easy to implement.

You can combine different Microformats to make the content even more useful, for example, you could have a blog entry written by a guest marked-up with hAtom, and then have the authors contact details marked up as a hCard, also using XFN to describe how the author is related to you. You could even use ‘rel-licence’ to show the licence for the entry for copyright reasons. As you can gather, they make the content have more meaning, and this makes microformats extremely exciting.


How can Microformats benefit me?

Microformats encourage standards

By providing a standard way of marking up data, Microformats encourage standards. Using standards makes you content much more friendly to machines (e.g search engines) and can enhance your content. Standards are definitely the way forward on the web, and Microformats will help.

Microformats make styling with CSS even easier

Since Microformats uses classnames to describe the content, you can style the individual classes with css, meaning css styling should be easier. Of course this is nothing new, you may already be using class names in the same content to style with css, but this way will most likely be more semantic and efficient, not forgetting less confusing; I often find myself forgetting what classes do what (bad practice I know).

Microformats are semantic and descriptive

By using them you make you content kinder, and easier to read and maintain. Descriptive markup is much easier to go through, and understand when you need to read it e.g when doing site updates.

Microformats are machine readable

This is perhaps the biggest advantage to using Microformats; consider the benefits to your site if machines (including search engines) can read and understand your content. Your content is much more relevant and useful with Microformats.

Microformats could be used with ‘plug-and-play’ scripts

Since the class names are standard, developers can, in theory, create scripts (e.g javascript) that work on ANY site using microformats by utilising the standard naming conventions they offer. This will make development a lot easier in the long run.

How do I view/use Microformats?

Currently, as microformats are relatively new, the ways of viewing Microformats are limited. The best way I’ve found is a firefox extension called ‘Tails’. You can read more about it here -> http://blog.codeeg.com/tails-firefox-extension-03/.

After installing it, you will see a microformats icon in the status bar of you browser, when it turns green it means microformats have been found on the site. Clicking it lets you view these microformats.

Screenshot of tails

The above screenshot shows my contact hCard in tails.

Another tool for using Microformats is found on Technorati, their contact feeds service.

This tool allows you to input any URL, and then it will automatically find any hCards on the target page and convert them to a download-able vCard for you to add to your email address book. As you can tell, this is very useful, and in the future, applications like this could make Microformats even more useful.

In the next section we will look at some microformats in greater depth…

Page: 1 2 3

Found this post useful? Why not buy me a coffee!

Related Entries

6 Responses to “Introduction to Microformats + a look at hCard & hAtom”

RSS feed for comments on this post.

  1. Anthony says:

    Great article that showcases some of the widest spread uses of Microformats, I’ll have myn up soon! Microformats is a word I found quite scary at first but the more you read about it the more you realise its possible widespread use.

    Comment made on February 9, 2007 at 6:07 pm

  2. Dactura says:

    I have been reading about hCard for two days… two 8 hour days and your article is the best. Especially appreciate that you have taken the time to take the vCard and format it nicely with CSS to appear as a business card. Nice touch!

    I still have no idea how one prevents the spam-bots from harvesting all these vcards though! I do not think the mung will help; but I do believe the spam filters are getting much better.

    Comment made on February 9, 2007 at 6:08 pm

  3. Mike J says:

    Thanks :)

    In regards to the spam bots, I know munging is not the perfect solution, but I havent had much problem with spam yet. There are other solutions out there, e.g javascript scripts for hiding mail, I personally havent tried them yet, but some could be effective (although no solution will ever be 100% effective).

    Any contact details on the web are always at risk from spam, its a shame, even forms get abused.

    Comment made on February 9, 2007 at 6:09 pm

  4. Astorg says:

    This is the best article on hcards I have seen so far. I agree with oen earlier commenter, though, that spam can be a problem. He mung will not be enough since tests have shown that even a minged address that has never been used for anything else can get spammed. Could you suggest details of a javascript solution?

    Comment made on May 29, 2007 at 3:00 pm

  5. Healing the Body says:

    Don’t worry too much about spambots. You still have to eyeball your creations and allow a bit of time for manual editing.

    Comment made on June 19, 2008 at 1:49 pm

The comments are closed.

About this site

Blue Anvil is the online web design journal & portfolio of , a web designer from Norfolk, England. Read More »
ThemeSlice
  • Featured work - More

    • Beefjack
    • Integrity
    • theotaku.com
  • Latest Tweet - More

    • New blog post: MiniCard 1.1.7 Update http://blue-anvil.com/archives/minicard-1-1-7-update/
  • Out of the blue - More

    • MiniCard 1.1.7 Update

      I have just uploaded 1.1.7 of MiniCard here and to the WordPress theme directory. This updates includes:

      • New networks; xing, gowalla, yelp, foursquare, mobileme, google buzz
      • A way to change link text and define multiple links of the same network
      • A way to define your own custom links + icons
      • Improved admin panel

      Hope you like it, and don’t forget you can show your support by purchasing the premium pack from here.

    • Switched: From Shared to VPS

      It’s been about two weeks now since I made the transition from a shared reseller hosting account to a VPS (Virtual Private Server) account – impressions so far, excellent performance but fiddly to configure.

      The reason I wanted to change from shared hosting was the fact the server was always being hacked (even though ALL my scripts were secure), there was frequent downtime, support blamed me for problems every time, and it was slow as hell.

      Those used to a shared hosting environment would probably not know where to start when faced with configuring a VPS. Luckily, a lot of it was pre-configured when I received my account – certainly some of the major security holes were patched. I was not satisfied with those however. As a victim of hacking in the past (previous host swears it was not there fault, something I don’t believe) I took extra care to secure it as a much I could – configuring brute force detection, the firewall, installing mod security (excellent rules for that here: http://www.atomicorp.com/wiki/index.php/Atomic_ModSecurity_Rules) and going though multiple guides (like this one: http://www.webhostingtalk.com/showthread.php?t=468168) with a fine-tooth comb.

      The result? My pages are loading at least 6 times faster, I have had no down time (or at least have not noticed any), and I feel in control and happy. No longer am I at the mercy of shared hosts :)

      If your interested, I chose ServInt as my provider as they offered a great deal, as well as being a managed service (so I’m not on my own if I screw things up). I was tempted by the bells and whistles of Media Temple, but felt the ServInt service was better value.

    • Download Monitor 3.2.2 Maintenance Release

      Download Monitor has received some more love and has been updated. Here’s the change log from the new version:

      • Small bugfix in uploader.php – cat ID
      • Changed stats graph calculation – thanks lggemini
      • Changes to headers in download.php to avoid caching
      • File Browser fixes – $root was clashing with something….
      • exclude_cat works in all sections of download_page now
      • Removed hardcoding of /uploads/
      • Added action to download.php – should be able to use it to stop a download if you want – maybe limiting downloads per day or something? Whatever you want…
      • Made it so if you post new file on ‘edit’ screen, the post date is updated.
      • Fixed the ‘blank meta’ section which blanks out custom field values when nothing is set.
      • Moved ‘allow_url_fopen’ check.
      • Someone said downloads don’t work with spaces in the name. They do! Wasting my time sonny…
      • All work and no play make jolley a dull boy
      • Had to rename capabilities so they work. Apologies if you have to set this up again! Cheers to Mark Dingemanse.
      • {category_ID} custom format tag added. Useful if you want to send someone to its category on the DL page I guess. Also added {category_other} so when no category is set “other” is shown – this is because the download page can show an ‘other’ section if you want it to.
      • You can now manually edit the post date on the edit download screen.

      If you have edited capabilities for download monitor user permissions, you’ll have to again sorry! This is because I named them too long. Also, you should check your forced downloads still work because there was a logic error meaning they may not have been forced after-all…

      Enjoy.

    • Mahousive update to Download Monitor (3.2)

      Today I completed the update for the Wordpress Download Monitor Plugin – many tweaks, fixes, and features added. There were no changes to the database structure so people upgrading should be fine. Here is the list from the change log:

      • {user} tag added for custom formats
      • ‘autop’ option fix
      • Download page buttons applied with CSS so they are easier to customise/translate.
      • Fix for pagination bug after editing a download
      • Category output fix on edit downloads screen
      • Category urls on download page use ID rather than name to prevent errors when cats have the same names.
      • exclude_cat added to download_page shortcode
      • Localised ‘hits’ ‘date’ ‘title’ on download page
      • Option to disable the download logging
      • Read file ‘chunked’ some people found large files were corrupted so this should help (fingers crossed)
      • Added show_tags option to download page – displays x amount of tags on the download page.
      • File Browser root setting and download.php logic/mime types modified thanks to Jim Isaacs (jidd.jimisaacs.com)
      • Interface Improvements
      • Bulk edit categories, custom fields, tags, member only downloads
      • Added roles for download monitor admin – should be able to use with a role manager plugin if you want anyone other than admin to access the admin section e.g. http://wordpress.org/extend/plugins/capsman/
      • Change redirect after add
      • Edit Cat names/parents
      • Dedicated tags and thumbnails fields (they still use meta table though)

      And yes, those category link bugs are fixed at long last, and you can edit category names finally. Phew!