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.

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. In September 2010 Google announced their intention to surface hCard, hReview information in their local search results. In February 2011, Facebook began using hCard to mark up event venues.

Example

Consider the HTML:

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

With microformat markup, that becomes:

 class="">      class="fn">Joseph Doe      class="nickname">Joe      class="org">The Example Company      class="tel">604-555-1234     
  • class="url" href="http://example.com/">http://example.com/
  • A profile may optionally be included in the page header:

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

    Here the properties fn, 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="duhoc-en " which indicates that the other classes form an , 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 Wiki 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 Wiki Foundation's contact details as of February 2023, as a live hCard:

    Wiki Du học
    1 Montgomery Street, Suite 1600
    San Francisco, CA 94104
    USA
    Phone: +1-415-839-6885
    Fax: +1-415-882-0495

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

     class="">      class="fn org">Wiki Foundation Inc.
    class="adr"> class="street-address">1 Montgomery Street, Suite 1600
    class="locality">San Francisco, class="region" title="California">CA class="postal-code">94104
    class="country-name">USA
    Phone: class="tel">+1-415-839-6885
    Email: class="email">[email protected]
    class="tel"> class="type">Fax: class="value">+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

    See also

    References

    Further reading


    This article uses material from the Wikipedia English article HCard, which is released under the Creative Commons Attribution-ShareAlike 3.0 license ("CC BY-SA 3.0"); additional terms may apply (view authors). Content is available under CC BY-SA 4.0 unless otherwise noted. Images, videos and audio are available under their respective licenses.
    ®Wikipedia is a registered trademark of the Wiki Foundation, Inc. Wiki English (DUHOCTRUNGQUOC.VN) is an independent company and has no affiliation with Wiki Foundation.

    Tags:

    Hcard ExampleHcard Geo and adrHcard Live exampleHcard Other attributesHcard Further readingHcardAtom (standard)Extensible Markup LanguageHTMLMicroformatRSS (file format)Rel attributeVCard

    🔥 Trending searches on Wiki English:

    Arizona CoyotesMarvin HarrisonSerena WilliamsThe Ministry of Ungentlemanly WarfareCassidy HutchinsonPornhubWiki FoundationChessStephen WarnockSingapore2024 in filmAnyone but YouTravis HeadBob MarleySonic the Hedgehog 3 (film)Breaking BadWhatsAppFreemasonryAparna DasDrake (musician)Fallout (series)Joe BidenYandexHeart (band)Ronnie O'SullivanBlack holeThree-body problemCatBenjamin FranklinPoor Things (film)Joseph StalinBruce WillisMichael J. Fox2024 Indian general election in BiharRyan ReynoldsPearl JamAdrian NeweyLiam NeesonStellar BladeFascismBarack ObamaMalaysia2024 Indian general election in Uttar PradeshList of ethnic slursWalmartCatherine, Princess of WalesIsrail MadrimovCryptocurrencyLimoneneGhoul (Fallout)Monkey Man (film)CanadaGeorgina ChapmanRobert F. Kennedy Jr.Tom CruiseJohnny CashKyle Jacobs (songwriter)2024–25 UEFA Champions LeagueO. J. SimpsonIndian National Developmental Inclusive AllianceJimmy ButlerSimon CowellDarwin BlanchSwitzerlandNetflixC. S. LewisProject 2025Aeroflot Flight 593Shirley MacLaineMinnie RipertonKevin De BruyneHouse (TV series)List of Stanley Cup championsMurder of Reena VirkInter MilanJosé MourinhoList of European Cup and UEFA Champions League finals🡆 More