h-card
<entry-title>h-card</entry-title> Tantek Çelik (Editor)
h-card is a simple, open format for publishing people and organisations on the web. h-card is one of several open microformat draft standards suitable for embedding data in HTML/HTML5.
h-card is the microformats-2 replacement for hCard.
Example
Here is a simple minimal person example:
<a class="h-card" href="http://example.com">Joe Bloggs</a>
And a slightly more complete example:
<p class="h-card">
<img class="u-photo" href="http://example.org/photo.png" />
<a class="p-name u-url" href="http://example.org">Joe Bloggs</a>
<a class="u-email" href="mailto:joebloggs@example.com">joebloggs@example.com</a>
<p class="p-adr h-adr">
<span class="p-street-address">17 Austerstræti</span>
<span class="p-locality">Reykjavík</span>
<span class="p-country-name">Iceland</span>
</p>
</p>
Get started
The class h-card
is a root class name that indicates the presence of an h-card.
For minimal examples where at most p-name
, u-url
and u-photo
are required (such as the first given above), only the root class name is needed — see implied properties.
For more complex examples, the root class name must be placed on an element which encloses all the desired properties, and then the properties themselves marked up using the classnames given below.
See microformats-2-parsing to learn more about property classnames.
Properties
h-card properties (inside class h-card
)
p-name
- The full/formatted name of the person or organisationp-honorific-prefix
- e.g. Mrs., Mr. or Dr.p-given-name
- given (often first) namep-additional-name
- other/middle namep-family-name
- family (often last) namep-sort-string
- string to sort byp-honorific-suffix
- e.g. Ph.D, Esq.p-nickname
- nickname/alias/handleu-email
- email addressu-logo
u-photo
u-url
- home pageu-uid
- unique identifierp-category
- category/tagp-adr
- postal address, optionally a nestedMain article: h-adrp-post-office-box
p-extended-address
p-street-address
- street number + namep-locality
- city/town/villagep-region
- state/county/provincep-postal-code
- postal code, e.g. US ZIPp-country-name
- country namep-label
p-geo
oru-geo
, optionally a nestedMain article: h-geop-latitude
- decimal latitudep-longitude
- decimal longitudep-altitude
- decimal altitudep-tel
- telephone numberp-note
- additional notesdt-bday
- birth dateu-key
- cryptographic public key e.g. SSH or GPGp-org
- affiliated organisation, optionally a nested h-cardp-job-title
- job title, previously 'title' in hCard, disambiguated.p-role
- description of roleu-impp
per RFC 4770, new in vCard4 (RFC6350)p-sex
- biological sex, new in vCard4 (RFC6350)p-gender-identity
- gender identity, new in vCard4 (RFC6350)dt-anniversary
Status
h-card is a microformats.org draft specification. Public discussion on h-card takes place on h-card-feedback, the #microformats irc channel on irc.freenode.net, and microformats-new mailing list.
h-card is ready to use and implemented in the wild, but for backwards compatibility you should also mark h-cards up as classic hCards.
Property Details
(stub, to be expanded)
p-adr
and its associated postal address properties can optionally use h-adr, for example:
<p class="p-adr h-adr">
<span class="p-street-address">17 Austerstræti</span>
<span class="p-locality">Reykjavík</span>
<span class="p-country-name">Iceland</span>
</p>
Examples in the wild
Real world in the wild examples:
- ... add uses of h-card you see in the wild here.
Background
This work is based on the existing hCard and vcard specifications.
Design Principles
(stub, expand)