hcard-cheatsheet

From Microformats Wiki
Revision as of 19:04, 28 November 2006 by AndyMabbett (talk | contribs) (geo notes)
Jump to navigation Jump to search

hCard cheetsheet

Properties

  • class="vcard" (1)
    • class="adr" (4)
      • class="type" [work|home|pref|postal|dom|intl] (3)
      • class="post-office-box" (3)
      • class="street-address" (4)
      • class="extended-address" (3)
      • class="region" (3)
      • class="locality" (3)
      • class="postal-code" (3)
      • class="country-name" (3)
    • class="agent" (4)
    • class="bday" (ISO date) (3)
    • class="class" – confidentiality/access classification of the entire hCard (3)
    • class="category" (4)
    • class="email" (4)
      • class="type" (3)
      • class="value" (3)
    • class="fn" (1)
    • class="geo" (3)
      • class="latitude" (3)
      • class="longitude" (3)
    • class="key" (4)
    • class="label" (4)
    • class="logo" (4)
    • class="mailer" (4)
    • class="n" (3)
      • class="honorific-prefix" (4)
      • class="given-name" (4)
      • class="additional-name" (4)
      • class="family-name" (4)
      • class="honorific-suffix" (4)
    • class="nickname" (4)
    • class="note" (4)
    • class="org" (4)
      • class="organization-name" (3)
      • class="organization-unit" (4)
    • class="photo" (4)
    • class="rev" – datetime of the revision of the entire hCard (3)
    • class="role" (4)
    • class="sort-string" (3)
    • class="sound" (4)
    • class="title" (4)
    • class="tel" (Note E.123 for formatting info.) (4)
      • class="type" [home|work|pref|fax|cell|pager] (3)
      • class="value" (3)
    • class="tz" – timezone of the person (3)
    • class="uid" – applies to the entire hCard (3)
    • class="url" (4)

Key

1 - Single occurrence required
2 - One or more, required (n/a)
3 - single occurrence optional
4 - zero or more occurrence
[square brackets] - common list of values
(data format)
pref = preferred
dom = domestic
intl = international
cell = mobile

Notes

  • URL in vCard becomes <a class="url" href="...">...</a> inside the element with class="vcard" in hCard.
  • Similarly, EMAIL in vCard becomes <a class="email" href="mailto:...">...</a>
  • PHOTO in vCard becomes <img class="photo" src="..." alt="Photo of ..." /> or <object class="photo" data="..." type="...">Photo of ...</object>
  • UID in vCard simply becomes another semantic applied to a specific URL (or EMAIL) for an hCard.

Geo

  • If latitude is present, so must be longitude, and vice versa.
  • If the secondary classes are omitted, the two values MUST be comma separated and latitude MUST be first:<span class=geo">37.386013,-122.082932</span>
  • The same number of decimal places SHOULD be used in each value.

Related pages

The hCard specification is a work in progress. As additional aspects are discussed, understood, and written, they will be added. These thoughts, issues, and questions are kept in separate pages.