HCARD


button to indicate the presence of an hCard microformat

'hCard' (short for '''HTML vCard)''') is a microformat for publishing the contact details of people, companies, organizations, and places, in (X)HTML, Atom, RSS, or arbitrary XML. hCard does this using a 1:1 representation of vCard (RFC 2426) properties and values.
It allows parsing tools (for example other websites, or Firefox's Operator extension) to extract the details, and display them using some other website or mapping tool, index or search them, or to load them into an address book program, for instance.

Contents
Example
Geo + adr
Live example
Other attributes
Users
External links

Example


Consider the HTML:

<div>
<div>Joe Doe</div>
<div>The Example Company</div>
<div>604-555-1234</div>
<a href="http://example.com/">http://example.com/</a>
</div>

With microformat markup, that becomes:

<div class="vcard">
<div class="fn">Joe Doe</div>
<div class="org">The Example Company</div>
<div class="tel">604-555-1234</div>
<a class="url" href="http://example.com/">http://example.com/</a>
</div>

Here the formal name (''fn''), organisation (''org''), telephone number (''tel'') and web address (''url'') have been identified using specific class names; and the whole thing is wrapped in class="vcard" which indicate that the other classes form an hcard, and are not just coincidentally named. If the hCard is for an organisation or venue, the ''fn'' and ''org'' classes are used on the same element, as in Wikipedia or Wembley Stadium. Other, optional, hCard classes also exist.
It is now possible for software, for example browser plug-ins, to extract the information, and transfer it to other applications, such as an address book.

Geo + adr


The Geo microformat is a part of the hCard specification, and is often used to include the coordinates of a location within an hCard.
The ''adr'' part of hCard can also be used as a stand-alone microformat.

Live example


Here are the Wikimedia Foundation's contact details, as a live hCard:


Wikimedia Foundation Inc.

200 2nd Ave. South #358
St. Petersburg, FL 33701-4313
USA

Phone: +1-727-231-0101
Email:
Fax: +1-727-258-0207


The mark-up (wrapped for clarity) used is:


Wikimedia Foundation Inc.

200 2nd Ave. South #358

St. Petersburg,
FL 33701-4313

USA

Phone: +1-727-231-0101
Email:

Fax:
+1-727-258-0207




(Ordinarily, one would use

FL

so that the output included region="Florida", but the abbr element is not supported on Wikipedia.)
Note that, in this example, the formal name (''fn'') and organisation (''org'') properties are combined on one element, indicating that this is the hCard for an organisation, not a person.

Other attributes


Other commonly used hCard attributes include

bday - a person's birth date

email

honorific-prefix

honorific-suffix

label - for non-granular addresses

logo

nickname

note - free text

photo

post-office-box
For a full list, see the hCard cheat-sheet.

Users


Organisations and other websites using hCard include:

University of Alabama at Birmingham

AOL - for journal authors

Avon Products - all representatives

★ The BBC

Birmingham City Council, England

★ The British Museum on [1]

Clackmannanshire Council

University of Edinburgh

Flock

Google, in Google Maps [2]

Harvard Business School

iBegin Source - 10.5+ million businesses

Last.fm - user pages

Lyro - online digital business card

OpenStreetMap

Opera.com - browser makers' website [3]

Seattle University

Southern Arkansas University

Stanford University

W3C webmaster Jean-Guilhem Rouel

★ The West Midland Bird Club

Wikipedia

Yahoo - on Yahoo Local

External links



hCard spec on microformats.org


cheat-sheet

converting .vcf files to hCard

python hCard parser

xml/javascript hCard parser

Jam, Firefox extension that generates hCard data from imported Vcard or CSV format data

This article provided by Wikipedia. To edit the contents of this article, click here for original source.

psst.. try this: add to faves