Travis Langley & Associates Website Design

Close to Home - Local Search, hCards and Microformats [ Part 2 ]

Travis Langley - Sunday, March 21, 2010

Earlier, I explained how to GeoTag your site to reach local clients and customers.  Another way to reach your local market is through the hCard Microformat.

At its simplest, the hCard is a 1:1 XHTML representation of the vCard, which has long been the standard in electronic business cards.  The hCard takes electronic business card contact information and formats it for any HTML, Atom, RSS, or XML file.  Your hCard can be formatted so that it is invisible to your site's visitors, but the contact information is collected by search engine spiders.

A simple hCard format, providing just your name and URL, would look something like this:

[ code ] <div class="vcard">
   <a class="url fn" href="http://www.travislangley.com/">
      Travis Langley
   </a>
</div>

Of course, by adding classes, you can add detail to your contact information, as in the following example:

[ code ] <div class="vcard">
   <span class="n">
      <span class="given-name">Travis</span>
      <span class="family-name">Langley</span>
   </span>
   <div class="org">Travis Langley & Associates</div>
   <a href="mailto:travis@travislangley.com">
      travis@travislangley.com
   </a>
   <div class="adr">
      <span class="locality">Edmond</span>
      <abbr class="region" title="Oklahoma">OK</abbr>
      <span class="country-name">United States</span>
   </div>
   <div>+1.405.923.5810</div>
</div>

For help creating an hCard for your site, you can use the hCard generator from Microformats.org.  You can learn how to hide your hCard in your website in the article "Everything About the hCard Microformat" at Qreative Zone.

The hCard is only one of the many microformats that add information to your site and make that data available for searching.  Microformats can also help you perform tasks quickly and easily:

  • Use XFN to link to friends and contacts.
  • hCalendar allows you to add events to your site.
  • With hReview, you can review books, movies, and products.
Microformats.org has tools and creators for all of the above microformats to help you with coding microformats for your site