Like HowStuffWorks on Facebook!

What are microformats?

        Tech | Computer

Tag Attributes
Supporters of microformats believe that designers like Scott Dvorin, shown working on print and online magazine The Knot, can use microformats to make the Web a deeper, more connected experience. 
Supporters of microformats believe that designers like Scott Dvorin, shown working on print and online magazine The Knot, can use microformats to make the Web a deeper, more connected experience. 
Marvi Lacar/Getty Images

Most tags have attributes, extra notations that can change certain aspects of the text in question. They act as a sort of label that's attached to a specific piece of data; it's like saying to the computer, "The majority of this text you can treat normally, but for this one line I'd like you to present it this way." If you're using the "span" tag, for example, and you want to make a piece of text show up red on a Web page, you could add the "style" attribute:

<span style="color: #0000ff;">HowStuffWorks</span>

Early on, people in the microformat community were looking around the HTML standard for more meaningful attributes -- most importantly, they wanted to use what was already available within HTML instead of scrapping everything and starting all over again with a completely different markup language.

What they found were three important attributes:

class - Allows developers to identify similar elements across several Web documents

rel - Describes the relationship of a linked document to the current document

rev - Describes the reverse of rel: The relationship of the current document to a linked document

Developers can add any one of these to an HTML tag and follow up with an equal sign and an easy-to-understand semantic label in quotation marks.

Take, for instance, the class attribute. If someone wanted to list the address "1234 Brain St.," it could look very simply like this in a Web document:

<span>1234 Brain St.</span>

This, however, is how that same code would look after adding a microformat:

<span class="street-address">1234 Brain St.</span>

The initial tag can be anything, whether it's "span," "p" and so on. The key to microformats is in standardizing the semantic labels you see in quotes.

So what does this accomplish, not just for the developer, but for the average Internet browser? Once these attributes are added to the code, specifically designed Web-based aggregators -- services that check for information around the Internet at regular intervals and collect it in one place -- can seek out relevant microformats. An hCard aggregator, for example, could search the Web for any pages that contain hCard microformats (which, at their most basic, look like class="vcard" within a Web document) -- a business could then easily pull in a significant amount of potential client information on a regular basis.

The microformat community is essentially saying, "These parts of HTML work really well; they're easy to use, and both people and computers understand them, so let's keep building upon this idea." Although we won't see microformats used extensively across the Web for a while, supporters of microformats and open source mark-up language are continuing to standardize and remain excited about the possibilities in store for an even more connected online experience.

For lots more information on microformats and emerging Web technologies, see the next page.


More to Explore