World Library  
Flag as Inappropriate
Email this Article

HCard

Article Id: WHEBN0002917772
Reproduction Date:

Title: HCard  
Author: World Heritage Encyclopedia
Language: English
Subject: Infobox cyclist, Infobox cyclist/doc, Infobox cyclist/sandbox, Infobox rugby union biography, Infobox Rugby Union biography/doc
Collection: Business Cards, Microformats
Publisher: World Heritage Encyclopedia
Publication
Date:
 

HCard

hCard is a (X)HTML, Atom, RSS, or arbitrary XML.[1] The hCard microformat does this using a 1:1 representation of vCard (RFC 2426) properties and values, identified using HTML classes and rel attributes.

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.

In May 2009, Google announced that they would be parsing the hCard, hReview and hProduct microformats, and using them to populate search-result pages.[2] In September 2010 Google announced their intention to surface hCard, hReview information in their local search results.[3] In February 2011, Facebook began using hCard to mark up event venues.[4]

Contents

  • Example 1
  • Geo and adr 2
  • Live example 3
  • Other attributes 4
  • See also 5
  • References 6
  • External links 7

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 properties fn,[5] org (organization), tel (telephone number) and url (. 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 and 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 of 2010-10-28, as a live hCard:

Wikimedia Foundation Inc.
149 New Montgomery Street, 3rd Floor
San Francisco, CA 94105
USA
Phone: +1-415-839-6885
Email:
Fax: +1-415-882-0495

The mark-up (wrapped for clarity) used is:

Wikimedia Foundation Inc.
149 New Montgomery Street, 3rd Floor
San Francisco, CA 94105
USA
Phone: +1-415-839-6885
Email:
Fax: +1-415-882-0495

Note that, in this example, the fn and org properties are combined on one element, indicating that this is the hCard for an organization, 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

See also

References

  1. ^ Sikos, Leslie (2011). Web Standards: Mastering HTML5, CSS3, and XML. Apress.  
  2. ^ Goel, Kavi; Guha, Ramanathan V.; Hansson, Othar (2009-05-12). "Introducing Rich Snippets". Google Webmaster Central Blog. Google. Retrieved 2009-05-25. 
  3. ^ Blumenthal, Mike (2010-09-22). "Google Announces Full Support for Microformats in Local". Understanding Google Maps. Retrieved 2010-09-30. 
  4. ^ Protalinski, Emil (2011-02-18). "Facebook adds hCalendar and hCard microformats to Events". ZDNet. Retrieved 24 March 2011. 
  5. ^ no friendly name defined in the specification http://microformats.org/articles/eng/hcard#Property_List but one might think of it as "formal name", "formatted name", or "family name"
  6. ^ http://microformats.org/articles/microformats2
  7. ^ http://microformats.org/articles/h-card
  8. ^ http://microformats.org/articles/Main_Page
  • Allsopp, John (2007). Microformats: Empowering Your Markup for Web 2.0. Berkeley: Friendsof. p. 125.  

External links

  • hCard spec on microformats.org
  • hCard cheat-sheet
  • hCard Creator
This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and USA.gov, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for USA.gov and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
 
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
 
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.
 


Copyright © World Library Foundation. All rights reserved. eBooks from Project Gutenberg are sponsored by the World Library Foundation,
a 501c(4) Member's Support Non-Profit Organization, and is NOT affiliated with any governmental agency or department.