Microformatting

For some time now I’ve been using rel-license; today I added hAtom and hCard. hCard was easy; I decided to just drop the url and fn attributes into a link around my name. hAtom, however, was a bit more difficult.

Things started out well thanks to Emily Lewis helpful guide, but Optimus microformat validator kept insisting that I was missing the author attribute. The guide addresses this, noting the spec allows for indicating the author separately with an hCard — something I had already set up. This is where problems began.

My first attempt was to change from (reduced code):

<p class='vcard'><a class='url fn'></a></p>

to (again reduced):

<p class='vcard'><address class='author'><a class='url fn'></a></address></p>

This did not turn out well, but turning it inside-out fixed the problem. I don’t know why.

Regardless, I now have what seems like theoretically correct markup — excepting that I haven’t really done the entry dates according to spec, due to uncertainty over the accessibility issues — but the validator maintains that I’m missing the author attribute.

At this point I’m not sure if my code is actually invalid or if it’s just an error in the validator. Regardless, it should be complete enough to work.

written 30 July, 02009 Comments