词条 | 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 (X)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, 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] ExampleConsider the HTML: With microformat markup, that becomes: Here the properties fn,[5] org (organization), tel (telephone number) and url (web address) have been identified using specific class names; and the whole thing is wrapped in 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 adrThe 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{{update after|2017|10|01|reason=The Wikimedia foundation is moving. See https://wikimediafoundation.org/wiki/Contact_us}}Here are the Wikimedia Foundation's contact details as of September 2017, as a live hCard:
The mark-up (wrapped for clarity) used is: 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 attributesOther commonly used hCard attributes include
See also
References1. ^{{cite book | last1 = Sikos | first1 = Leslie | title = Web Standards: Mastering HTML5, CSS3, and XML | publisher = Apress | year = 2011 | url = https://books.google.com/books?id=c4_wQQ1iajgC&dq | accessdate = 2013-05-10 | isbn = 978-1430240419}} 2. ^{{cite web|url=http://googlewebmastercentral.blogspot.com/2009/05/introducing-rich-snippets.html|title=Introducing Rich Snippets|last=Goel|first=Kavi|first2=Ramanathan V.|last2=Guha|first3=Othar|last3=Hansson|date=2009-05-12|work=Google Webmaster Central Blog|publisher=Google|accessdate=2009-05-25}} 3. ^{{cite web|url=http://blumenthals.com/blog/2010/09/22/google-announces-full-support-for-microformats-in-local/|title=Google Announces Full Support for Microformats in Local|last=Blumenthal|first=Mike|date=2010-09-22|work=Understanding Google Maps|accessdate=2010-09-30}} 4. ^{{cite web|url=http://www.zdnet.com/blog/facebook/facebook-adds-hcalendar-and-hcard-microformats-to-events/266|title=Facebook adds hCalendar and hCard microformats to Events|last=Protalinski|first=Emil|date=2011-02-18|publisher=ZDNet|accessdate=24 March 2011}} 5. ^no friendly name defined in the specification http://microformats.org/wiki/hcard#Property_List, but one might think of it as "formal name", "formatted name", or "family name"
External links
2 : Microformats|Business cards |
随便看 |
|
开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。