Jump to content

Microformat

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Pigsonthewing (talk | contribs) at 19:04, 1 March 2007 (copy edits). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Microformats are mark-up that allow expression of semantics in an HTML (or XHTML) web page. Programs can extract meaning from a web page that is marked up with microformats.

Existing (X)HTML standards allow for semantics to be embedded and encoded within them. This is done using specific HTML attributes:

  • class
  • rel
  • rev

Adding microformats to a regular HTML web page allows machines to process HTML text and to possibly load data into remote databases. This would allow programs such as web crawlers to find items such as contact information, events, and reviews on web pages.

Example

For example, consider the hCard contact information microformat:

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

Here the formal name (fn), organisation (org), telephone number (tel) and url have been identified using specific class names; and the whole thing is wrapped in class="vcard", (see vCard) which indicate that the other classes form an hcard, and are not just coincidentally named. 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.

Specific microformats

Several microformats have been developed to enable semantic markup of particular types of information.

Proposed microformats

Among the many proposed microformats, the following are nearing completion:

  • currency - for amounts of money
  • geo extension - for places on Mars, The Moon, and other such bodies
  • species - For the names of living things.

Uses of microformats

Using microformats within HTML code provides additional formatting and semantic data that can be used by applications. These could be applications that collect data about on-line resources, such as web crawlers, or desktop applications such as e-mail clients or scheduling software.

Several browser extensions, such as Tails Export and Operator, provide the ability to detect microformats within an HTML document and export them into formats compatible with contact management and calendar utilities, such as Microsoft Outlook.

Microsoft[1] and other software companies have expressed a desire to incorporate Microformats into upcoming projects.

Creation of microformats

Most of the existing microformats were created at the microformat wiki and associated mailing list, by a process of gathering examples of web publishing behaviour, then codifying it. Some other microformats (such as rel=nofollow, unAPI and rel=pavatar) have been proposed, or developed, elsewhere.

See also

Books

This page lists books which provide description and documentation of microformats.

  • Using Microformats by Brian Suda
    • ISBN 0-596-52817-5, 2006
    • This is a PDF book, part of the O'Reilly Short Cuts series. It is a solid introduction to all the established microformats, the history, philosophy and a look at where microformats are headed.
  • HTML Mastery by Paul Haine
    • Friends of Ed, ISBN 1-59059-765-6, 2006
    • Chapter 5, pp. 117-154: Purpose Built Semantics: Microformats and Other Stories.