h-card: Difference between revisions

From Microformats Wiki
Jump to navigation Jump to search
(redir for now)
 
(Created stub based off h-cite)
Line 1: Line 1:
#redirect:[[microformats2#h-card]]
{{stub}}
 
<entry-title>h-card</entry-title>
<span class="h-card vcard"><span class="p-name fn">[[User:Tantek|Tantek Çelik]]</span> (<span class="p-role role">Editor</span>)</span>
----
<dfn style="font-style:normal;font-weight:bold">h-card</dfn> is a simple, open format for publishing people and organisations on the web. h-card is one of several open [[microformats|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:
 
<source lang=html4strict>
<a class="h-card" href="http://example.com">Joe Bloggs</a>
</source>
 
And a slightly more complete example:
 
<source lang=html4strict>
<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>
</source>
 
=== Get started ===
The class '''<code>h-card</code>''' is a ''root class name'' that indicates the presence of an h-card.
 
For minimal examples where at most <code>p-name</code>, <code>u-url</code> and <code>u-photo</code> are required (such as the first given above), only the root class name is needed — see [[microformats-2-implied-properties|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 <code>'''h-card'''</code>)
 
* '''<code>p-name</code>''' - The full/formatted name of the person or organisation
* '''<code>p-honorific-prefix</code>''' - e.g. Mrs., Mr. or Dr.
* '''<code>p-given-name</code>''' - given (often first) name
* '''<code>p-additional-name</code>''' - other/middle name
* '''<code>p-family-name</code>''' - family (often last) name
* '''<code>p-sort-string</code>''' - string to sort by
* '''<code>p-honorific-suffix</code>''' - e.g. Ph.D, Esq.
* '''<code>p-nickname</code>''' - nickname/alias/handle
* '''<code>u-email</code>''' - email address
* '''<code>u-logo</code>'''
* '''<code>u-photo</code>'''
* '''<code>u-url</code>''' - home page
* '''<code>u-uid</code>''' - unique identifier
* '''<code>p-category</code>''' - category/tag
* '''<code>p-adr</code>''' - postal address, optionally a nested {{main|h-adr}}
* '''<code>p-post-office-box</code>'''
* '''<code>p-extended-address</code>'''
* '''<code>p-street-address</code>''' - street number + name
* '''<code>p-locality</code>''' - city/town/village
* '''<code>p-region</code>''' - state/county/province
* '''<code>p-postal-code</code>''' - postal code, e.g. US ZIP
* '''<code>p-country-name</code>''' - country name
* '''<code>p-label</code>'''
* '''<code>p-geo</code>''' or '''<code>u-geo</code>''', optionally a nested {{main|h-geo}}
* '''<code>p-latitude</code>''' - decimal latitude
* '''<code>p-longitude</code>''' - decimal longitude
* '''<code>p-altitude</code>''' - decimal altitude
* '''<code>p-tel</code>''' - telephone number
* '''<code>p-note</code>''' - additional notes
* '''<code>dt-bday</code>''' - birth date
* '''<code>u-key</code>''' - cryptographic public key e.g. SSH or GPG
* '''<code>p-org</code>''' - affiliated organisation, optionally a nested h-card
* '''<code>p-job-title</code>''' - job title, previously 'title' in [[hCard]], disambiguated.
* '''<code>p-role</code>''' - description of role
* '''<code>u-impp</code>''' per RFC 4770, new in vCard4 (RFC6350)
* '''<code>p-sex</code>''' - biological sex, new in vCard4 (RFC6350)
* '''<code>p-gender-identity</code>''' - gender identity, new in vCard4 (RFC6350)
* '''<code>dt-anniversary</code>'''
 
== Status ==
'''h-card''' is a microformats.org draft specification. Public discussion on hCard takes place on [[h-cite-feedback]], the #microformats [[irc]] channel on irc.freenode.net, and [http://microformats.org/discuss/mail/microformats-new/ 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 [[hCard]]s.
 
== Property Details ==
(stub, to be expanded)
 
<code>p-adr</code> and its associated postal address properties can optionally use [[h-adr]], for example:
 
<source lang=html4strict>
<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>
</source>
 
== 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)
 
== See Also ==
 
* [[microformats-2]]
* [[microformats-2-parsing]]
* [[h-adr]]
* [[h-geo]]
* [[hCard]]
 
[[Category:Draft Specifications]]

Revision as of 15:39, 13 June 2013

This article is a stub. You can help the microformats.org wiki by expanding it.

<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 organisation
  • p-honorific-prefix - e.g. Mrs., Mr. or Dr.
  • p-given-name - given (often first) name
  • p-additional-name - other/middle name
  • p-family-name - family (often last) name
  • p-sort-string - string to sort by
  • p-honorific-suffix - e.g. Ph.D, Esq.
  • p-nickname - nickname/alias/handle
  • u-email - email address
  • u-logo
  • u-photo
  • u-url - home page
  • u-uid - unique identifier
  • p-category - category/tag
  • p-adr - postal address, optionally a nested
    Main article: h-adr
  • p-post-office-box
  • p-extended-address
  • p-street-address - street number + name
  • p-locality - city/town/village
  • p-region - state/county/province
  • p-postal-code - postal code, e.g. US ZIP
  • p-country-name - country name
  • p-label
  • p-geo or u-geo, optionally a nested
    Main article: h-geo
  • p-latitude - decimal latitude
  • p-longitude - decimal longitude
  • p-altitude - decimal altitude
  • p-tel - telephone number
  • p-note - additional notes
  • dt-bday - birth date
  • u-key - cryptographic public key e.g. SSH or GPG
  • p-org - affiliated organisation, optionally a nested h-card
  • p-job-title - job title, previously 'title' in hCard, disambiguated.
  • p-role - description of role
  • u-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 hCard takes place on h-cite-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)

See Also