HCard
hCard[edit | edit source]
hCard is a microformat used to represent people, companies, organizations, and places in (X)HTML, Atom, RSS, or arbitrary XML. It is a simple, open format that allows for the embedding of vCard data in web pages, making it easier to share contact information across the web.
Overview[edit | edit source]
hCard is a microformat that uses a 1:1 representation of the vCard standard, which is a widely used format for electronic business cards. The hCard format allows for the embedding of vCard data within HTML and other XML-based languages, enabling web pages to contain rich, semantic contact information that can be easily extracted and used by other applications.
Structure[edit | edit source]
An hCard is typically embedded in a web page using a combination of HTML elements and specific class names. The basic structure of an hCard includes the following elements:
- fn (formatted name): The full name of the person or organization.
- n (name): A structured representation of the name, including components such as given-name, family-name, etc.
- org (organization): The name of the organization.
- adr (address): The physical address, which can include components like street-address, locality, region, postal-code, and country-name.
- tel (telephone): A telephone number.
- email: An email address.
- url: A URL associated with the person or organization.
Example[edit | edit source]
Here is a simple example of an hCard embedded in HTML:
<div class="vcard"> <a class="url fn" href="http://www.example.com">John Doe</a> <div class="org">Example Company</div> <div class="adr"> <span class="street-address">123 Example Street</span>, <span class="locality">Example City</span>, <span class="region">EX</span>, <span class="postal-code">12345</span> </div> <div class="tel">+1-555-555-5555</div> <a class="email" href="mailto:john.doe@example.com">john.doe@example.com</a> </div>
Applications[edit | edit source]
hCard data can be used by various applications to extract and utilize contact information. For example, web browsers and other tools can parse hCard data to allow users to easily add contacts to their address books. Search engines can also use hCard data to enhance search results with rich snippets.
See Also[edit | edit source]
External Links[edit | edit source]
Search WikiMD
Ad.Tired of being Overweight? Try W8MD's physician weight loss program.
Semaglutide (Ozempic / Wegovy and Tirzepatide (Mounjaro / Zepbound) available.
Advertise on WikiMD
WikiMD's Wellness Encyclopedia |
Let Food Be Thy Medicine Medicine Thy Food - Hippocrates |
Translate this page: - East Asian
中文,
日本,
한국어,
South Asian
हिन्दी,
தமிழ்,
తెలుగు,
Urdu,
ಕನ್ನಡ,
Southeast Asian
Indonesian,
Vietnamese,
Thai,
မြန်မာဘာသာ,
বাংলা
European
español,
Deutsch,
français,
Greek,
português do Brasil,
polski,
română,
русский,
Nederlands,
norsk,
svenska,
suomi,
Italian
Middle Eastern & African
عربى,
Turkish,
Persian,
Hebrew,
Afrikaans,
isiZulu,
Kiswahili,
Other
Bulgarian,
Hungarian,
Czech,
Swedish,
മലയാളം,
मराठी,
ਪੰਜਾਬੀ,
ગુજરાતી,
Portuguese,
Ukrainian
Medical Disclaimer: WikiMD is not a substitute for professional medical advice. The information on WikiMD is provided as an information resource only, may be incorrect, outdated or misleading, and is not to be used or relied on for any diagnostic or treatment purposes. Please consult your health care provider before making any healthcare decisions or for guidance about a specific medical condition. WikiMD expressly disclaims responsibility, and shall have no liability, for any damages, loss, injury, or liability whatsoever suffered as a result of your reliance on the information contained in this site. By visiting this site you agree to the foregoing terms and conditions, which may from time to time be changed or supplemented by WikiMD. If you do not agree to the foregoing terms and conditions, you should not enter or use this site. See full disclaimer.
Credits:Most images are courtesy of Wikimedia commons, and templates Wikipedia, licensed under CC BY SA or similar.
Contributors: Prab R. Tumpati, MD