hcard2rdf
   HOME

TheInfoList



OR:

hCard is a
microformat Microformats (μF) are predefined HTML markup (like HTML classes) created to serve as descriptive and consistent metadata about elements, designating them as representing a certain type of data (such as contact information, geographic coor ...
for publishing the contact details (which might be no more than the name) of people, companies, organizations, and places, in
HTML Hypertext Markup Language (HTML) is the standard markup language for documents designed to be displayed in a web browser. It defines the content and structure of web content. It is often assisted by technologies such as Cascading Style Sheets ( ...
,
Atom Atoms are the basic particles of the chemical elements. An atom consists of a atomic nucleus, nucleus of protons and generally neutrons, surrounded by an electromagnetically bound swarm of electrons. The chemical elements are distinguished fr ...
,
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 ...
, or arbitrary
XML Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing data. It defines a set of rules for encoding electronic document, documents in a format that is both human-readable and Machine-r ...
. 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, N ...
(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 curr ...
's Operator extension) to extract the details, and display them, using some other websites or
map A map is a symbolic depiction of interrelationships, commonly spatial, between things within a space. A map may be annotated with text and graphics. Like any graphic, a map may be fixed to paper or other durable media, or may be displayed on ...
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 corporation and technology company focusing on online advertising, search engine technology, cloud computing, computer software, quantum computing, e-commerce, consumer electronics, and artificial ...
announced that they would be parsing the hCard and hReview and hProduct microformats, and using them to populate search-result pages. In September 2010
Google Google LLC (, ) is an American multinational corporation and technology company focusing on online advertising, search engine technology, cloud computing, computer software, quantum computing, e-commerce, consumer electronics, and artificial ...
announced their intention to surface hCard, hReview information in their local search results. In February 2011,
Facebook Facebook is a social media and social networking service owned by the American technology conglomerate Meta Platforms, Meta. Created in 2004 by Mark Zuckerberg with four other Harvard College students and roommates, Eduardo Saverin, Andre ...
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, full name or prosoponym (from Ancient Greek ''prósōpon'' – person, and ''onoma'' –name) is the set of names by which an individual person or animal is known. When taken together as a word-group, they all relate to that ...
", "formal name", "formatted name", or "family name"
''nickname'', ''org'' (organization), ''tel'' (telephone number) and ''url'' (
web address A uniform resource locator (URL), colloquially known as an address on the Web, is a reference to a resource that specifies its location on a computer network and a mechanism for retrieving it. A URL is a specific type of Uniform Resource Identi ...
) 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. (WMF) is an American 501(c)(3) nonprofit organization headquartered in San Francisco, California, and registered there as foundation (United States law), a charitable foundation. It is the host of Wikipedia, th ...
's contact details , as a live hCard:
Wikimedia Foundation, Inc.
1 Montgomery Street, Suite 1600
San Francisco, CA 94104
USA
Phone: +1-415-839-6885
Email:
Fax: +1-415-882-0495
The mark-up (wrapped for clarity) used is:
Wikimedia Foundation Inc.
1 Montgomery Street, Suite 1600
San Francisco, CA 94104
USA
Phone: +1-415-839-6885
Email:
Fax: +1-415-882-0495
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 *bdaya person's birth date *email *honorific-prefix *honorific-suffix *labelfor non-granular addresses *logo *nickname *notefree 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, N ...
*
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 blo ...
* FOAF


References


Further reading

*
hCard 1.0
on microformats.org {{DEFAULTSORT:Hcard Microformats Business cards