« APML and getting the content I like | Main | mocolocal beta »

address tag vs. hCard

Sitepoint has a good article about the gray area between XHTML and microformats.

They touch on a point that I'd been wondering about. When I first discovered the hCard creator I was impressed that I could fill in my information and get code that helped me understand hCard rules. I was disappointed that all the code was put into div and span heavy coding. I explored adding the information to the address tag that we currently employ for contact information at work. I see now that we've been using the address tag incorrectly because we've been adding street addresses to it. From the sitepoint article:

Now, those paying attention – and those who have devoured the contents of this reference from cover to cover – may well be saying at this point: "Ah, but there is an element for addresses. It's called 'address'." But alas, you are mistaken. A quick check back to the reference for address will reveal that it is not used for the purpose of marking up a physical location, but is in fact for identifying the point of contact for a web page, and therefore may include an email address, or a telephone number or something of that ilk. If the address element is used for marking up a location (number, street, city etc), then it's actually been mis-used. So, what should you do?

Enter Microformats.

Maybe we should work on a mishmash of the address tag and an hCard, which can reside in any XHTML tag. I'd love to see examples in the wild.

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

The views and opinions expressed in this page are strictly those of the page author. The contents of this page have not been reviewed or approved by the University of Minnesota.