Are microformats a future on the web


We haven't reworked all of the older articles yet. This usually only applies to the code examples that are not yet optimally represented.


HTML is a semantically poor language. The W3C has long thought about the "Semantic Web". But a more semantic web is currently emerging "from below", using currently existing methods: microformats help with this. Michael Jendryschik introduces this interesting concept.

When Tim Berners-Lee was working on his Hypertext Markup Language in 1990, he designed it as a simple hypertext language that should be able to compile basic menus for hypertext navigation and simple documents such as help files, logs or technical documentation. The first versions had around 50 element types for marking textual content. Today's 4.01 and its "big sister" 1.0 know around 90 element types for semantic annotation of content, but unfortunately these are still far too few to be semantically complete. The requirement for more semantics can be clearly emphasized on the basis of the element type. A document that contains the following element reveals different amounts of information to people and machines:

The information that the document contains contact information about the author is machine-readable, i.e. recognizable for browsers and other user programs, structured by a few line breaks, including an email address and a link to a website. We humans, as long as we are able to use the natural language used, can make out much more information: We recognize beyond that

  • a name,
  • an address consisting of street, house number, zip code and city as well
  • a landline and a mobile phone number.

However, this information is Not machine-readable and therefore not or only to a limited extent programmatically reusable. This is exactly the problem that microformats try to solve. It refers to Formats for the »fine structuring« of websites. Documents, especially documents, are supplemented by additional semantics so that they can be read by humans and machines, without changing the content. Three attributes are used:, and.

The attributes, and

The attribute assigns a class name or a set of class names to an element. The same class name can be assigned to any number of elements. Like all attributes, classes are noted in the element's start tag:

If elements belong to several classes, for example to the class "important" and to the class "external", the class names are listed separated by a space:

The and attributes are mainly noted on elements and assume opposite roles - the attribute specifies a forward relationship and the attribute specifies a backward relationship. The attribute describes the relationship between the current document and the target resource specified by the attribute. The attribute is used to describe a backward link from the target resource specified by the attribute to the current document. The value of both attributes is a space-separated list of descriptions.

So says for example

Assume that the linked resource provides a glossary for the current document. With

indicates that the current document is a table of contents for the linked resource.

Microformats are used by assigning elements to one or more of the three attributes with fixed values.

Available formats

There are now numerous formats for very specific forms of awards. A distinction is made between two groups of formats: elementary and compound. Compound formats such as hCard or hReview are based on elementary formats such as or rel-tag and all ultimately up. The most popular microformats include the following:

  • hCard is a microformat used to mark up contact information. It transmits the vCard standard (2426) in.
    A vCard is an electronic business card that a user can import directly into an address book.
  • hCalendar is now a very common microformat that is based on vCalendar (2445). This is a format for labeling calendar and event data.
  • The format is used to mark social relationships. This allows you to indicate whether you have already met someone personally or whether they are a work colleague, a friend or a family member.
  • xFolk is used to mark bookmarks.
  • HAtom is suitable for labeling weblog entries and news.
  • One of the most important microformats in the future will certainly be hReview, which can be used to enrich reviews and reviews of services, events, films and - above all - products.

There are now a large number of other format specifications and drafts that are listed in the Microformats Wiki.

Examples: hCard and hCalendar

It is a good idea to demonstrate the use of microformats using hCard by expanding the above example with the appropriate classes and a few enclosing elements:

All information that was previously only readable by humans can now also be understood by machines.

Another example is the use of the hCalendar microformat. Among other things, it is used on the event overview of Einfach für alle, the Aktion-Mensch initiative for a barrier-free web. An event, here the 2006 awards ceremony, is awarded as follows, for example:

Create and process microformats

The annotation of microformats to -documents is by no means difficult and can easily be done by hand. However, you are not completely on your own: There are now some tools that help authors with this work. The hCard Creator helps with the creation of an hCard. For hCalendar there is a comparable service with the hCalendar Creator, for hReview the hReview Creator. Figure 1 shows how easy it is to use the hCard Creator. The generated code can be edited and copied directly into the target document.

The creation of microformats, however, is only one side of the coin, their evaluation and processing is the other. But even there there are now some useful tools and browser extensions.

Technorati, a real-time search engine especially for weblogs, offers a so-called Contacts Feed Service, which makes it possible to export excellent contact information in vCard format using an hCard. If you give a website that contains the element extended above, the service delivers a file that can now be easily imported into common address books - a fine thing.

The Events Feed Service does the same for calendar dates. A file is exported that can be imported directly into programs such as Mozilla Sunbird.

There are also browser extensions that read out, display and process microformats, for example converting them into a corresponding target format and offering them for export, for Firefox among others the Tails Firefox Extension and Tails Export - the latter unfortunately only up to version 1.5. Figure 2 shows Tails in action.


Microformats enrich documents and machine-readable with semantic information without changing its content. It is important to note: Machine-readable semantics are reusable content, that is, it is possible to further process data provided with microformats. Information can be read from a website and made accessible to other programs. This results in great added value for the user. Imagine if the event overview of your preferred concert hall or your favorite disco was marked with microformats - what a practical benefit you would have from it! You could extract the data of all or selected events from the websites with just a few clicks and make them available to your calendar software. Microformats are part of Web 2.0: They mark social relationships, support bookmarking and tagging. And imagine how useful microformats can become when search engines discover them for themselves. Book or review websites could be rated that much more efficiently.

The events calendar, the profile pages of Xing, the contact page of, the product reviews of Yahoo! Tech and many other examples show that microformats can already be used effectively today. You should also start today to refine the content of your website with microformats!

Related Links