[uf-discuss] Geo microformat doubt
Toby A Inkster
mail at tobyinkster.co.uk
Mon May 5 02:28:55 PDT 2008
Ana Belén Ramón wrote:
> Is this microformat right?
> <a href="#" class="geo" title="42.3;-1.96667">Madrid, Spain</a>
No — the title attribute is only used for <abbr>. There are
alternative proposals to use the title attribute for other elements,
but most parsers do not support those yet.
Usage of the <abbr> pattern should "work", although it is terrible
semantically:
<a href="#">
<abbr class="geo" title="42.3;-1.96667">Madrid, Spain</abbr>
</a>
Because "Madrid, Spain" really isn't an abbreviation for
"42.3;-1.96667". If you use value excerpting you might be able to
come up with something a bit more acceptable semantically:
<a href="#" class="geo">
Madrid, Spain
<abbr class="value" title="42.3;-1.96667"></abbr>
</a>
As it happens, Cognition <http://buzzword.org.uk/cognition/> will
successfully parse your first, non-standard geo, because as a last
ditch attempt at parsing a geo, it will simply look for two semi-
colon or comma delimited numbers anywhere in the HTML code (including
href attributes, comments, whatever!), but that is an extension of
the geo spec — it's not a standard part of it.
--
Toby A Inkster
<mailto:mail at tobyinkster.co.uk>
<http://tobyinkster.co.uk>
More information about the microformats-discuss
mailing list