APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed

Microformats


© October 2006 Anthony Lawrence

2006/10/30

You may have heard mention of "microformats" recently. If you investigated, you probably ran across mumbling like this from https://microformats.org/about/:

Designed for humans first and machines second, microformats are a set of simple, open data formats built upon existing and widely adopted standards. Instead of throwing away what works today, microformats intend to solve simpler problems first by adapting to current behaviors and usage patterns (e.g. XHTML, blogging).

That paragraph (and the rest of the page it came from) really does sum up microformats nicely. That it does so while leaving you still uninformed and clueless could be seen as mildly amusing for the cognoscenti, but probably is simply annoying and frustrating for everyone else.

Let's take the mystery out of it: Microformats are nothing more (and nothing less) than using XHTML markup to more fully identify data. That's it. No magic, no mumbo jumbo. Here's an example:

Tony Lawrence
A.P. Lawrence
1101 Lantern Lane
Middleboro , MA , 02346 USA
781 249-8010

This hCard created with the hCard creator.




If you "View Source" on this page, you'll see that each section of that "hCard" is marked with a "class" tag:

<span class="postal-code"02346</span

Note what's important here is the "class=", not the "span" - the class could have just as well be applied to a <li> tag. But if that's all there was to microformats, they'd just be another confusing tagging mechanism, no doubt complete with a monstrous XML schema that tried to be all things to all people. That's the inherent problem of data tagging after all: who defines the tags?

Microformats sidestep that issue. If you noticed the very first tag, it references something that already exists and is in wide use:

<div class="vcard">

That "div" encloses the other data and defines the meaning of the inner class tags. Any program that already understands vCards can now extract data directly from this web page and import that data into itself. There are Firefox extensions that do just that.

Now go back and look again at that paragraph I quoted. Makes more sense now, doesn't it? Apple has given this a nod in their new .Mac webmail, and Firefox seems to be planning more microformat integration, as does Microsoft, so you'll probably be hearing this term again.

Update: Google endorses "Rich Snippet" microformats for hcard and hreview markup.

Also see The Big Picture on Microformats.


Got something to add? Send me email.





(OLDER)    <- More Stuff -> (NEWER)    (NEWEST)   

Printer Friendly Version

->
-> Microformats

1 comment


Inexpensive and informative Apple related e-books:

Take Control of OS X Server

Take control of Apple TV, Second Edition

Photos: A Take Control Crash Course

Take Control of Apple Mail, Third Edition

El Capitan: A Take Control Crash Course




More Articles by © Anthony Lawrence






Mon Oct 30 18:53:59 2006: 2565   TonyLawrence

gravatar
By the way, the "class=" isn't the only identifier for a microformat. See (link) for example.



------------------------


Printer Friendly Version

Have you tried Searching this site?

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more.

Contact us


Printer Friendly Version





You can't do it unless you can imagine it. (George Lucas)




Linux posts

Troubleshooting posts


This post tagged:

Basics

Web/HTML



Unix/Linux Consultants

Skills Tests

Unix/Linux Book Reviews

My Unix/Linux Troubleshooting Book

This site runs on Linode





SCO Unix Sales, Support, & Service

Phone:  707-SCO-UNIX (707-726-8649Toll Free: 833-SCO-UNIX (833-726-8649)
www.SCOsales.com