The purpose of Microformats is to make Web documents smarter.
HTML, XHTML, BLOGS, RSS, ATOM, XML
In these tutorials I will primarily demonstrate Microformats with HTML and XHTML documents; but remember that
Microformats also apply to other Web documents.
Let's spend a few minutes reviewing HTML. Then we will examine how Microformats
can be used to make HTML documents smarter.
HTML is a general-purpose markup language for describing document (i.e., structural) properties of information.
Below is an example of information that has been marked up using HTML tags. It is an HTML representation of John Doe's business card.
The div and span tags are particularly devoid of helpful semantics.
However, HTML does have more semantic-rich tags. The tags in the example below indicate an
"unordered list" of "items". These tags are more semantic-rich.
But even these tags are lacking: they don't tell you that the list is comprised of information about a book.
Purpose of Microformats
The purpose of Microformats is to enrich the semantics of Web documents.
However, there is more to the story than just enriching the semantics
of Web documents. Read on ...
No New Markup
When the Microformat's initiative began in 2005, they decided that they wanted to create something that
Web developers could use immediately. They wanted a Semantic Web now!
This meant no changes to the existing set of HTML tags.
The Microformat community hunted through the HTML specification looking for ways
to enhance the semantics, and they found it: the class attribute.
Actually, the class attribute is one of three attributes that the Microformat's
community identified for enhancing the semantics of HTML pages: class, rel, rev.
Nearly every HTML tag has an optional class attribute. That attribute can be used
to add a "semantic label" to data.
The class value "street-address" has added semantics to the data!
Many Ways to Mark Up Data
Consider a Web developer providing street address data in his Web document.
Depending on how the data is being used, the street address data may be marked up
using a span tag, or it may be needed in a list and thus
embedded within a li tag, or it may be marked up in countless other ways.
No Impact to Presentation
Microformats don't care what HTML tag you use.
Microformats only cares that you
attach a class attribute onto the tag and then use the appropriate
value for the class attribute.
Standardized Class Values
Imagine if every Web developer (or every organization) created his own semantic labels (i.e., class values). Web
pages would have enriched semantics only within the Web developer's circle of users.
But outside that circle of users the semantic labels would have no meaning. Rather than enriching the whole Web,
user-defined semantic labels would fracture the Web into many non-interoperable pieces.
Hyperlinks are considered fundamental to the Web. And deservedly so. They enable a Web document to connect to other documents. Stated differently, they enable information to connect to other information.
In today's world the emphasis is on being able to "combine information". That is, we want to do mashups.
Consider a Web document that links to another document. One can envision an application which combines the two documents. Thus, an application can mashup the Web document with the documents it is linked to.
Unanticipated Mashups (cont.)
But what about mashups with other documents, for which it does not link to? That is, what about unanticipated mashups?