This article needs to beupdated. The reason given is:virtually all of the content is from the late 2000s. Please help update this article to reflect recent events or newly available information.(March 2020) |
| Microformats | |
|---|---|
| Abbreviation | μF |
| Status | Published |
| Year started | 2005 |
| Latest version | Microformats2 May 2010; 15 years ago (2010-05) |
| Related standards | Microdata (HTML),RDF,RDF Schema,OWL |
| Domain | Semantic Web |
| Website | microformats |
Microformats (μF)[note 1] are predefinedHTML markup (likeHTML classes) created to serve as descriptive and consistentmetadata aboutelements, designating them as representing a certain type of data (such ascontact information,geographic coordinates, events, products, recipes, etc.).[1] They allowsoftware to process the information reliably by having set classes refer to a specific type of data rather than being arbitrary.
Microformats emerged around 2005 and were predominantly designed for use by search engines,web syndication andaggregators such asRSS.[2] Google confirmed in 2020 that it still parses microformats for use in content indexing.[3] Microformats are referenced in several W3C social web specifications, including IndieAuth[4] and Webmention.[5]
Although the content of web pages has been capable of some "automated processing" since the inception of the web, such processing is difficult because themarkup elements used to display information on the web do not describe what the information means.[6] Microformats can bridge this gap by attachingsemantics, and thereby obviating other, more complicated, methods of automated processing, such asnatural language processing orscreen scraping. The use, adoption and processing of microformats enables data items to be indexed, searched for, saved or cross-referenced, so that information can be reused or combined.[6]
As of 2013[update], microformats allow the encoding and extraction of event details, contact information, social relationships and similar information.
Microformats2, abbreviated as mf2, is the updated version of microformats. Mf2 provides an easier way of interpretingHTML structured syntax and vocabularies than the earlier ways that made use of RDFa and microdata.[7]
Microformats emerged around 2005[note 2] as part of a grassroots movement to make recognizable data items (such as events, contact details or geographical locations) capable of automated processing by software, as well as directly readable by end-users.[6][note 3] Link-based microformats emerged first. These include vote links that express opinions of the linked page, which search engines can tally into instant polls.[8]
CommerceNet, a nonprofit organization that promotese-commerce on the Internet, has helped sponsor and promote the technology and support the microformats community in various ways.[8] CommerceNet also helped co-found the Microformats.org community site.[8]
Neither CommerceNet nor Microformats.org operates as astandards body. The microformats community functions through an openwiki, a mailing list, and an Internet relay chat (IRC) channel.[8] Most of the existing microformats originated at the Microformats.org wiki and the associated mailing list[citation needed] by a process of gathering examples of web-publishing behaviour, then codifying it. Some other microformats (such asrel=nofollow andunAPI) have been proposed, or developed, elsewhere.
XHTML and HTML standards allow for the embedding and encoding of semantics within theattributes of markup elements. Microformats take advantage of these standards by indicating the presence of metadata using the following attributes:
classrel<a href=... rel=...>...</a>)revFor example, in the text "The birds roosted at52.48,-1.89" is a pair of numbers which may be understood, from their context, to be a set ofgeographic coordinates. With wrapping inspans (or other HTML elements) with specific class names (in this casegeo,latitude andlongitude, all part of thegeo microformat specification):
Thebirdsroostedat<spanclass="geo"><spanclass="latitude">52.48</span>,<spanclass="longitude">-1.89</span></span>
Software agents can recognize exactly what each value represents and can then perform a variety of tasks such as indexing, locating it on a map and exporting it to aGPS device.
In this example, the contact information is presented as follows:
<ul><li>JoeDoe</li><li>TheExampleCompany</li><li>604-555-1234</li><li><ahref="http://example.com/">http://example.com/</a></li></ul>
With hCard microformat markup, that becomes:
<ulclass="vcard"><liclass="fn">JoeDoe</li><liclass="org">TheExampleCompany</li><liclass="tel">604-555-1234</li><li><aclass="url"href="http://example.com/">http://example.com/</a></li></ul>
Here, the formatted name (fn), organisation (org), telephone number (tel) andweb address (url) have been identified using specific class names and the whole thing is wrapped inclass="vcard", which indicates that the other classes form an hCard (short for "HTMLvCard") and are not merely coincidentally named. Other, optional, hCard classes also exist. Software, such as browser plug-ins, can now extract the information, and transfer it to other applications, such as an address book.
For annotated examples of microformats on live pages, seeHCard#Live example andGeo (microformat)#Usage.
Several microformats have been developed to enable semantic markup of particular types of information. However, only hCard and hCalendar have been ratified, the others remaining as drafts:
Using microformats within HTML code provides additional formatting and semantic data that applications can use. For example, applications such asweb crawlers can collect data about online resources, or desktop applications such as e-mail clients or scheduling software can compile details. The use of microformats can also facilitate "mash ups" such as exporting all of the geographical locations on a web page into (for example)Google Maps to visualize them spatially.
Several browser extensions, such asOperator forFirefox and Oomph forInternet Explorer, provide the ability to detect microformats within an HTML document. When hCard or hCalendar are involved, such browser extensions allow microformats to be exported into formats compatible with contact management and calendar utilities, such asMicrosoft Outlook. When dealing with geographical coordinates, they allow the location to be sent to applications such asGoogle Maps.Yahoo! Query Language can be used to extract microformats from web pages.[16] On 12 May 2009Google announced that they would be parsing the hCard, hReview and hProduct microformats, and using them to populate search result pages.[17] They subsequently extended this in 2010 to use hCalendar for events and hRecipe for cookery recipes.[18] Similarly, microformats are also processed byBing[19] andYahoo!.[20] As of late 2010, these are the world's top three search engines.[21]
Microsoft said in 2006 that they needed to incorporate microformats into upcoming projects,[22] as did other software companies.
Alex Faaborg summarizes the arguments for putting the responsibility for microformat user interfaces in the web browser rather than making more complicated HTML:[23]
Various commentators have offered review and discussion on the design principles and practical aspects of microformats. Microformats have been compared to other approaches that seek to serve the same or similar purpose.[24] As of 2007[update], there had been some criticism of one, or all, microformats.[24] The spread and use of microformats was being advocated as of 2007[update].[25][26]Opera Software CTO andCSS creatorHåkon Wium Lie said in 2005 "We will also see a bunch of microformats being developed, and that’s how thesemantic web will be built, I believe."[27] However, in August 2008 Toby Inkster, author of the "Swignition" (formerly "Cognition") microformat parsing service, pointed out that no new microformat specifications had been published since 2005.[28]
Computer scientist and entrepreneur,Rohit Khare stated thatreduce, reuse, and recycle is "shorthand for several design principles" that motivated the development and practices behind microformats.[8]: 71–72 These aspects can be summarized as follows:
Because some microformats make use of title attribute of HTML's<abbr> element to concealmachine-readable data (particularly date-times and geographical coordinates) in the "abbr design pattern", the plain text content of the element is inaccessible toscreen readers that expand abbreviations.[29] In June 2008 theBBC announced that it would be dropping use of microformats using theabbr design pattern because of accessibility concerns.[30]
Microformats are not the only solution for providing "more intelligent data" on the web; alternative approaches are used and are under development. For example, the use ofXML markup and standards of the Semantic Web are cited as alternative approaches.[8] Some contrast these with microformats in that they do not necessarily coincide with the design principles of "reduce, reuse, and recycle", at least not to the same extent.[8]
One advocate of microformats,Tantek Çelik, characterized a problem with alternative approaches:
Here's a new language we want you to learn, and now you need to output these additional files on your server. It's a hassle. (Microformats) lower the barrier to entry.[6]
For some applications the use of other approaches may be valid. If the type of data to be described does not map to an existing microformat,RDFa can embed arbitrary vocabularies into HTML, such as for example domain-specific scientific data such as zoological or chemical data for which there is no microformat. Standards such as W3C'sGRDDL allow microformats to be converted into data compatible with the Semantic Web.[31]
Another advocate of microformats, Ryan King, put the compatibility of microformats with other approaches this way:
Microformats provide an easy way for many people to contribute semantic data to the web. With GRDDL all of that data is made available for RDF Semantic Web tools. Microformats and GRDDL can work together to build a better web.[31]
Microformats2 was proposed and discussed during FOOEast, 2010-05-02.[32] Microformats2 was intended to make it easier for authors to publish microformats and for developers to consume them, while remaining backwards compatible[33]
Using microformats2, the example above would be marked up as:
Thebirdsroostedat<spanclass="h-geo geo"><spanclass="p-latitude latitude">52.48</span>,<spanclass="p-longitude longitude">-1.89</span></span>
and:
<ulclass="h-card vcard"><liclass="p-name fn">JoeDoe</li><liclass="p-org org">TheExampleCompany</li><liclass="p-tel tel">604-555-1234</li><li><aclass="u-url url"href="http://example.com/">http://example.com/</a></li></ul>
We need microformats and to get people to agree on them. It is going to bootstrap exchanging data on the Web… …we need them for things like contact cards, events, directions…