HCard

hCard is a microformat for publishing the contact details (which might be no more than the name) of people, companies, organizations, and places, in 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 and 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

* 1 Example
* 2 Geo and adr
* 3 Live example
* 4 Other attributes
* 5 See also
* 6 References
* 7 Further reading

## Example

Consider the HTML:

<ul>
<li>Joseph Doe</li>
<li>Joe</li>
<li>The Example Company</li>
<li>604-555-1234</li>
<li><a href="http://example.com/">http://example.com/</a></li>
</ul>

With microformat markup, that becomes:

<ul class="vcard">
<li class="fn">Joseph Doe</li>
<li class="nickname">Joe</li>
<li class="org">The Example Company</li>
<li class="tel">604-555-1234</li>
<li><a class="url" href="http://example.com/">http://example.com/</a></li>
</ul>

A profile may optionally be included in the page header:

<link rel="profile" href="http://microformats.org/profile/hcard">

Here the properties fn,[5] nickname, org (organization), tel (telephone number) and url (web address) 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 `<span class="fn org">Wikipedia</span>` or `<span class="fn org">Wembley Stadium</span>`. 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 February 2023[update], as a live hCard:

> Wikimedia Foundation, Inc.

> 1 Montgomery Street, Suite 1600

> San Francisco, CA 94104

> USA

> Phone: +1-415-839-6885

> Email: info@wikimedia.org

> Fax: +1-415-882-0495

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

<div class="vcard">
<div class="fn org">Wikimedia Foundation Inc.</div>
<div class="adr">
<div class="street-address">1 Montgomery Street, Suite 1600</div>
<div> <span class="locality">San Francisco</span>, <abbr class="region" title="California">CA</abbr> <span class="postal-code">94104</span></div>
<div class="country-name">USA</div>
</div>
<div>Phone: <span class="tel">+1-415-839-6885</span></div>
<div>Email: <span class="email">info@wikimedia.org</span></div>
<div class="tel">
<span class="type">Fax</span>:
<span class="value">+1-415-882-0495</span>
</div>
</div>

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
* XHTML Friends Network
* FOAF

## References

1. ↑ Sikos, Leslie (2011). Web Standards: Mastering HTML5, CSS3, and XML. Apress. ISBN 978-1430240419. https://books.google.com/books?id=c4_wQQ1iajgC. Retrieved 2013-05-10.
2. ↑ Goel, Kavi; Guha, Ramanathan V.; Hansson, Othar (2009-05-12). "Introducing Rich Snippets". Google Webmaster Central Blog. https://googlewebmastercentral.blogspot.com/2009/05/introducing-rich-snippets.html.
3. ↑ Blumenthal, Mike (2010-09-22). "Google Announces Full Support for Microformats in Local". Understanding Google Maps. http://blumenthals.com/blog/2010/09/22/google-announces-full-support-for-microformats-in-local/.
4. ↑ Protalinski, Emil (2011-02-18). "Facebook adds hCalendar and hCard microformats to Events". ZDNet. http://www.zdnet.com/blog/facebook/facebook-adds-hcalendar-and-hcard-microformats-to-events/266.
5. ↑ no friendly name defined in the specification http://microformats.org/wiki/hcard#Property_List, but one might think of it as "full name", "formal name", "formatted name", or "family name"

## Further reading

* Allsopp, John (2007). Microformats: Empowering Your Markup for Web 2.0. Berkeley: Friendsof. p. 125. ISBN 978-1-59059-814-6. https://archive.org/details/isbn_9781590598146/page/125.
* hCard 1.0 on microformats.org

* v
* t
* e

Semantic Web

Background|

* Databases
* Hypertext
* Internet
* Ontologies
* Semantics
* Semantic networks
* World Wide Web

Sub-topics|

* Dataspaces
* Hyperdata
* Linked data
* Rule-based systems

Applications|

* Semantic analytics
* Semantic broker
* Semantic computing
* Semantic mapper
* Semantic matching
* Semantic publishing
* Semantic reasoner
* Semantic search
* Semantic service-oriented architecture
* Semantic wiki

Related topics|

* Collective intelligence
* Description logic
* Folksonomy
* Geotagging
* Information architecture
* Knowledge extraction
* Knowledge management
* Knowledge representation and reasoning
* Library 2.0
* Digital library
* Digital humanities
* Metadata
* References
* Topic map
* Web 2.0
* Web engineering
* Web Science Trust

Standards|

| Syntax and supporting technologies|

* HTTP
* IRI
* URI
* RDF
* triples
* RDF/XML
* JSON-LD
* Turtle
* TriG
* Notation3
* N-Triples
* TriX (no W3C standard)
* RRID
* SPARQL
* XML
* Semantic HTML

|

Schemas, ontologies and rules|

* Common Logic
* OWL
* RDFS
* Rule Interchange Format
* Semantic Web Rule Language
* ALPS
* SHACL

Semantic annotation|

* eRDF
* GRDDL
* Microdata
* Microformats
* RDFa
* SAWSDL
* Facebook Platform

Common vocabularies|

* DOAP
* Dublin Core
* FOAF
* Schema.org
* SIOC
* SKOS

Microformat vocabularies|

* hAtom
* hCalendar
* hCard
* hProduct
* hRecipe
* hResume
* hReview

0.00

(0 votes)

Original source: https://en.wikipedia.org/wiki/HCard. Read more

|

Retrieved from "https://handwiki.org/wiki/index.php?title=HCard&oldid=4157663"
*[CA]: California
*[v]: View this template
*[t]: Discuss this template
*[e]: Edit this template