HCard

HCard

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 websites or mapping tools, index or search them, or to load them into an address book program.

Example

Consider the HTML:

Joe Doe
Jo
The Example Company
604-555-1234
http://example.com/

With microformat markup, that becomes:

Joe Doe
Jo
The Example Company
604-555-1234
http://example.com/

Here the formal name ("fn"), organization ("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

ee also

* DataPortability

References

*cite book |title=Microformats: Empowering Your Markup for Web 2.0 |last=Allsopp |first=John |authorlink= |coauthors= |year=2007 |publisher=Friendsof |location=Berkeley |isbn=1590598148 |pages=p. 125

External links

* [http://microformats.org/wiki/hcard hCard spec on microformats.org]
* [http://microformats.org/wiki/hcard-cheatsheet hCard cheat-sheet]
* Some have recommended using hCard Microformat for the sake of local search engine optimization. While there's no clear benefit to local search placement from using hCard, this [http://searchengineland.com/071015-123143.php article on hCard and local search] outlines reasons why it's a good idea to incorporate.
* [http://www.webmonkey.com/tutorial/Add_hCard_to_Your_Site hCard tutorial wiki on webmonkey.com]


Wikimedia Foundation. 2010.

Игры ⚽ Нужна курсовая?

Look at other dictionaries:

  • Hcard — est un microformat pour publier les détails de contact des personnes, organisations et lieux, en (X)HTML, Atom, RSS, ou XML. hCard est une représentation conforme du standard vCard (RFC 2426). Il permet aux outils de parsage (par exemple à d… …   Wikipédia en Français

  • HCard — est un microformat pour publier les détails de contact des personnes, organisations et lieux, en (X)HTML, Atom, RSS, ou XML. hCard est une représentation conforme du standard vCard (RFC 2426). Il permet aux outils de parsage (par exemple à d… …   Wikipédia en Français

  • HCard — (сокращение для HTML vCard) микроформат для публикации контактной информации людей, компаний, организаций и мест в (X)HTML, Atom, RSS или произвольном XML. hCard является представлением 1 в 1 параметров и значений формата vCard (RFC 2426).… …   Википедия

  • hCard — (сокращение для HTML vCard) микроформат для публикации контактной информации людей, компаний, организаций и мест в (X)HTML, Atom, RSS или произвольном XML. hCard является представлением один к одному параметров и значений формата vCard (RFC 2426) …   Википедия

  • hCard — es un microformato destinado a marcar los datos de cualquier persona o entidad añadiendo un contenido semántico a los mismos y permitiendo de esta forma que tanto máquinas como personas puedan procesarlos y entenderlos. Está basado en el estándar …   Wikipedia Español

  • HCard — Saltar a navegación, búsqueda hCard es un microformato destinado a marcar los datos de cualquier persona o entidad añadiendo un contenido semántico a los mismos y permitiendo de esta forma que tanto máquinas como personas puedan procesarlos y… …   Wikipedia Español

  • Microformat — For the photographic miniaturization of documents, see Microform. For details of microformats used on Wikipedia, see Wikipedia:Microformats. A microformat (sometimes abbreviated μF) is a web based approach to semantic markup which seeks to re use …   Wikipedia

  • VCard — Infobox file format name = vCard icon = extension = .vcf, .vcard mime = text/x vcard text/directory;profile=vCard text/directory type code = vCrd uniform type = public.vcard owner = Internet Mail Consortium genre = electronic business card… …   Wikipedia

  • Microformato — Un microformato (a veces abreviado con μF o uF) es una forma simple de agregar significado semántico a un contenido legible por un humano mientras que para una máquina puede ser sólo texto plano. Según el W3C, son conjuntos de formatos de datos… …   Wikipedia Español

  • Micro-format — Microformat Un microformat (parfois abrégé sous μF ou uF) est une approche de formatage de données basé sur le web[1] qui cherche à réutiliser le contenu existant comme les métadonnées, en n utilisant que des classes[2] et attributs[3] XHTML et… …   Wikipédia en Français

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”