[thelist] marking up an address
Alastair Campbell
ac at alastc.com
Wed Aug 9 17:21:08 CDT 2006
Phil Pickering wrote:
> Interesting conversation... :)
Definitely, I'd forgotten about some of the details and got it mixed up
in my memory!
I tend to take a less strict view on Def lists than some, thinking of it
more as an associative list. After all, it's key difference is that you
can have multiple 'descriptions' per 'term'. Does that really make sense
for pure definitions?
From the example given from Simplebits, I'd probably have gone for this
(assuming it's ok to use <address> for a physical address?):
<dl>
<dt>ABC Widgets, Inc.</dt>
<dd><address>100 - 1234 West Main Street<br />
Anytown, State<br />
Zip</address></dd>
<dt title="phone">Ph:</dt>
<dd>555-555-1234</dd>
<dt title="facsimile">Fax:</dt>
<dd>555-555-1234</dd>
</dl>
But, I'm not aware of *anything* that actually uses the address element
- it's probably the confusion over it's use has meant it hasn't been used :/
Microformats examples carefully steer clear of using the address element:
http://microformats.org/wiki/hcard-examples#Organizations_and_Departments
For practical use I'd be more inclined to follow the hCard markup:
<div class="vcard">
<div class="adr">
<div class="org fn">
<div class="organization-name">Sprinkler Fitters U.A. Local 483</div>
<div class="organization-unit extended-address">Apprenticeship
Training Center</div>
</div>
<div class="street-address">2531 Barrington Court</div>
<span class="locality">Hayward</span>,
<abbr title="California" class="region">CA</abbr>
<span class="postal-code">94545</span>
</div>
</div>
However, that doesn't feel quite 'right', as it's just div & span tags.
I though something like this would work:
<div class="vcard">
<dl class="adr">
<dt class="organization-name">ABC Widgets, Inc.</dt>
<dd>
<span class="street-address">100 - 1234 West Main Street</span>
<span class="locality">Anytown</span>, <span
class="region">State</span>
<span class="postal-code">Zip</span>
</dd>
</dl>
</div>
However, the 'associative' nature of dt/dd pairs doesn't allow the
proper nesting of the microformat (i.e. the type and value should be
inside the 'tel' part).
Hmmm, back to the divs...
-Alastair
More information about the thelist
mailing list