Microformats Introduction
I’m on record as being skeptical of the semantic web. Or rather, I’m skeptical of much of the marketing hype around the semantic web. That’s not to say that semantic technologies won’t be useful.
I still believe that both Resource Description Framework (RDF) and the Web Ontology Language (OWL) are too complicated to gain widespread adoption. But maybe we don’t need their academic rigor. Microformats offer a way to get some of the benefits of the semantic web using plain ol’ HTML.
What are microformats? How do they work? Emily Lewis wrote a great series of blog posts introducing microformats. You can also go direct to the source, the microformats homepage, at microformats.org.
An example
Here’s an example of our company address in hCard format.
The address above is marked up in such a way that (some) web browsers can identify it as a street address. But it’s nothing more than ordinary HTML. Here’s what the code looks like:
-
<div id="infovark_vcard" class="vcard">
-
<a class="url fn n" href="http://www.infovark.com"> <span class="given-name">Infovark</span>
-
<span class="additional-name"></span>
-
<span class="family-name"></span>
-
</a>
-
<div class="org">Infovark</div>
-
<a class="email" href="mailto:info@infovark.com">info@infovark.com</a>
-
<div class="adr">
-
<div class="street-address">10104 Bushman Dr.</div>
-
<span class="locality">Oakton</span>,
-
<span class="region">VA</span>,
-
<span class="postal-code">22124</span>
-
<span class="country-name">USA</span>
-
</div>
-
<div class="tel">800-833-9796</div>
-
</div>
It’s simple enough that it just might deliver where RDF and OWL fail, becoming part of every web developer’s toolkit.
Get started
You can experiment by creating your own hCards using the hCard creator.
And if you’re using Mozilla Firefox, you can download the Operator add-in to see — and use — microformatted data embedded in ordinary web pages.
Hat tip: Ajaxian for Getting Semantic with Mircoformats
No related posts.