# Purpose of Microformats

### Roger Costello

Click arrow key () to navigate to next page

# Purpose of Microformats

- 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

- 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.

# Browser Rendering

# HTML Semantics

- 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.

# Semantic Labels

- 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.
  - This is known as The Tower of Babel.
- A key insight by the Microformat's community is that semantic labels must be created in a controlled, standardized process.

# Example Microformat

# Aggregating Microformats

- An hCard aggregator searches the Web looking for Web pages that contain hCard Microformats. The result is a service capable of providing business card info to the Web community!

# Purpose of Microformats (Revised)

- The purpose of Microformats is to:
  - Enrich the semantics of Web documents.
  - Enrich the semantics of the whole Web.
    - In a bottom-up, grassroots fashion, one Web document at a time.
  - Create standard semantic labels.
    - Via a clearly defined community process.
  - Leverage existing standards (don't reinvent).

# Brilliance of Microformats

- Web developers mark up their Web documents as they ordinarily would.
- They are then invited to make their documents more semantically rich by adding class attributes with standardized semantic labels (i.e., class values).
- There is no impact to the document's presentation.
- There is a big (positive) impact on how effectively the document's information can be processed by Web applications.
- Tiny changes to Web documents facilitate huge, immediate changes to the overall semantic richness of the Web.

# Wisdom of Microformats

- In his book, The Wisdom of Crowds, James Suroweicki says that to effectively harness the collective intelligence of a crowd - such as the Web - there needs to be the right balance between:
  - making individual knowledge globally and collectively useful
  - allowing individual knowledge to remain resolutely specific and local
- The Microformats approach has found the right balance:
  - Microformats provide the semantic labels that enable individual knowledge to be collected, aggregated, and processed
  - Simultaneously, at the local level Web page developers are empowered to express their individual knowledge in a fashion that is best suited to their specific problem
- See the Making Local Knowledge Globally Useful

# Reference

- For an explanation of why enriching the semantics of the Web involves more than just creating good semantic labels, see this slide show by Tantek Celic:
  - More Than Just "Good Class Names" (Note: use your arrow keys to navigate through his slide show)
- Homepage