Visit Mozilla.org

The hCard microformat

From MDC

This article covers features introduced in Firefox 3

The hCard microformat describes an entry in a contact database, as a virtual business card.

[edit] Properties

Property Description
adr The contact's address or addresses; this is a plural property, so multiple addresses may be provided. These are specified using the adr microformat.
agent hCards for zero or more people who act as agents on behalf of the contact.
bday The contact's birthdate.
class A class for the contact.
category Zero or more categories with which the contact is associated. This uses the tag microformat.
email Zero or more email addresses for the contact. Each email address entry includes two subproperties, both of which are plural:
type
This can be one or more of internet, x400, or pref. The pref type indicates the preferred email address.
value
One or more email addresses associated with the specified type.
fn Required. The contact's full name.
geo The contact's physical location, specified using the geo microformat. Optional.
key The contact's public key, for exchanging encrypted data with the contact.
label Formatted text providing an address label for the contact.
logo Optional URI to a graphic image of a logo for the contact; this can be used for a company logo, for example.
mailer Optional; specifies the type of email software used by the contact.
n The contact's name. This has the following subproperties:
honorific-prefix
Zero or more honorifics to prepend to the name. For example, ["Mr."], or ["Honorable", "Governor"].
given-name
The contact's given name.
additional-name
An additional name, such as the middle name.
family-name
The contact's family name.
honorific-suffix
Zero or more honorifics to append to the name.

The n property is normally required, but since Mozilla's implementation offers an implied n optimization, it is optional, and will be parsed from the fn property if not specifically provided.

nickname Zero or more nicknames for the contact.
note Zero or more HTML notes with additional information about the contact.
org The organization with which the contact is associated. This includes the following subproperties:
organization-name
The name of the organization with which the contact is associated.
organization-unit
The name of the division or department within the organization with which the contact is associated.
photo Zero or more URIs providing photographs of the contact.
rev The date and time at which the contact was last revised.
role Zero or more roles the contact fills within his or her organization.
sequence A revision number for the contact. Each time the contact is revised, this number should be incremented, if this property is used at all.
sort-string If provided, this string is used instead of the fn or n property to determine the sort order for the card. This can be useful in cases where the locale of the contact's name has different sorting rules than other names in the user's contact database.
sound An optional URI specifying a sound file associated with the contact.
title Zero or more job titles for the contact.
tel The contact's telephone number(s). Each entry has the following subproperties:
type
The type of phone number. Can be one or more of the following: msg, home, work, pref, voice, fax, cell, video, pager, bbs, car, isdn, pcs.
tel
The telephone number, specified using the tel datatype.
tz The contact's time zone.
uid A unique UID for this contact.
url Zero or more URLs associated with the contact, specified using the anyURI datatype.

[edit] See also