HOME

TheInfoList



OR:

hCard is a
microformat Microformats (μF) are a set of defined HTML classes created to serve as consistent and descriptive metadata about an element, designating it as representing a certain type of data (such as contact information, geographic coordinates, events ...
for publishing the contact details (which might be no more than the name) of people, companies, organizations, and places, in
HTML The HyperText Markup Language or HTML is the standard markup language for documents designed to be displayed in a web browser. It can be assisted by technologies such as Cascading Style Sheets (CSS) and scripting languages such as JavaScri ...
,
Atom Every atom is composed of a nucleus and one or more electrons bound to the nucleus. The nucleus is made of one or more protons and a number of neutrons. Only the most common variety of hydrogen has no neutrons. Every solid, liquid, gas, and ...
,
RSS RSS ( RDF Site Summary or Really Simple Syndication) is a web feed that allows users and applications to access updates to websites in a standardized, computer-readable format. Subscribing to RSS feeds can allow a user to keep track of many di ...
, or arbitrary
XML Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing arbitrary data. It defines a set of rules for encoding documents in a format that is both human-readable and machine-readable. T ...
. The hCard microformat does this using a 1:1 representation of
vCard vCard, also known as VCF (Virtual Contact File), is a file format standard for electronic business cards. vCards can be attached to e-mail messages, sent via Multimedia Messaging Service (MMS), on the World Wide Web, instant messaging, NFC or ...
(RFC 2426) properties and values, identified using HTML classes and ''rel'' attributes. It allows parsing tools (for example other websites, or
Firefox Mozilla Firefox, or simply Firefox, is a free and open-source web browser developed by the Mozilla Foundation and its subsidiary, the Mozilla Corporation. It uses the Gecko rendering engine to display web pages, which implements current and ...
's Operator extension) to extract the details, and display them, using some other websites or
map A map is a symbolic depiction emphasizing relationships between elements of some space, such as objects, regions, or themes. Many maps are static, fixed to paper or some other durable medium, while others are dynamic or interactive. Although ...
ping tools, index or search them, or to load them into an address-book program. In May 2009,
Google Google LLC () is an American multinational technology company focusing on search engine technology, online advertising, cloud computing, computer software, quantum computing, e-commerce, artificial intelligence, and consumer electronics. ...
announced that they would be parsing the hCard,
hReview hReview is a microformat for publishing reviews of books, music, films, restaurants, businesses, holidays, etc.Microformats: Empowering Your Markup for Web 2.0 (2007) by John Allsopp p. 200 using (X)HTML on web pages, using HTML classes and ''re ...
and
hProduct hProduct is a microformat for publishing details of products, on web pages, using (X)HTML classes and ''rel'' attributes. On 12 May 2009, Google announced that they would be parsing the hProduct, hCard and hReview hReview is a microforma ...
microformats, and using them to populate search-result pages. In September 2010
Google Google LLC () is an American multinational technology company focusing on search engine technology, online advertising, cloud computing, computer software, quantum computing, e-commerce, artificial intelligence, and consumer electronics. ...
announced their intention to surface hCard,
hReview hReview is a microformat for publishing reviews of books, music, films, restaurants, businesses, holidays, etc.Microformats: Empowering Your Markup for Web 2.0 (2007) by John Allsopp p. 200 using (X)HTML on web pages, using HTML classes and ''re ...
information in their local search results. In February 2011,
Facebook Facebook is an online social media and social networking service owned by American company Meta Platforms. Founded in 2004 by Mark Zuckerberg with fellow Harvard College students and roommates Eduardo Saverin, Andrew McCollum, Dustin M ...
began using hCard to mark up event venues.


Example

Consider the HTML: With microformat markup, that becomes: A profile may optionally be included in the page header: Here the properties ''fn'',no friendly name defined in the specification http://microformats.org/wiki/hcard#Property_List, but one might think of it as "
full name A personal name, or full name, in onomastic terminology also known as prosoponym (from Ancient Greek πρόσωπον / ''prósōpon'' - person, and ὄνομα / ''onoma'' - name), is the set of names by which an individual person is known, ...
", "formal name", "formatted name", or "family name"
nickname, ''org'' (organization), ''tel'' (telephone number) and ''url'' (
web address A Uniform Resource Locator (URL), colloquially termed as a web address, is a reference to a web resource that specifies its location on a computer network and a mechanism for retrieving it. A URL is a specific type of Uniform Resource Identifie ...
) have been identified using specific class names; and the whole thing is wrapped in class="vcard" which indicates that the other classes form an hcard, and are not just coincidentally named. If the hCard is for an organization 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 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 The Wikimedia Foundation, Inc., or Wikimedia for short and abbreviated as WMF, is an American 501(c)(3) nonprofit organization headquartered in San Francisco, California and registered as a charitable foundation under local laws. Best kno ...
's contact details as of September 2017, 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

*
vCard vCard, also known as VCF (Virtual Contact File), is a file format standard for electronic business cards. vCards can be attached to e-mail messages, sent via Multimedia Messaging Service (MMS), on the World Wide Web, instant messaging, NFC or ...
*
XHTML Friends Network XHTML Friends Network (XFN) is an HTML microformat developed by Global Multimedia Protocols Group that provides a simple way to represent human relationships using links. XFN enables web authors to indicate relationships to the people in their blog ...


References


Further reading

*


External links


hCard spec on microformats.org

hCard cheat-sheet
{{DEFAULTSORT:Hcard Microformats Business cards