[uf-discuss] Mark-up for vCard in table rows
Paul Wilkins
paul_wilkins at xtra.co.nz
Sun Mar 25 14:16:09 PST 2007
From: "Andy Mabbett" <andy at pigsonthewing.org.uk>
> I'm trying to advise someone about marking up an existing table; uFs are
> not supposed to require the re-engineering of valid HTML.
Modern markup techniques can't be expected to work with ancient coding
troubles.
The only way to group address parts in separate td elements is to group them
from the tr element.
With the adr class in the tr element, the hcard grouping has to be further
up, so with the current manner of marking up microformats, the table code
you're working with isn't able to be marked up without modification.
A way of successfully marking it up is to combine the td elements together,
and use div and span to adjust the layout with css.
<tr class="hcard"><td>
<div class="fn org"><a href="...">Visitor Center</a></div>
<div class="adr">
<div class="flag"><img alt="" src="flag.png" /> <a href="..."
class="country-name">Nepal</a></div>
<div class="map"><span class="locality">Okhaldhunga</span> (40 km) <a
href="...">map</a></div>
</div>
</td></tr>
But if you want to mark up the original code with no structural changes,
because of the structured nature of microformats, that won't be possible.
--
Paul Wilkins
More information about the microformats-discuss
mailing list