From Microformats Wiki
Revision as of 01:10, 5 June 2006 by Fthiess (talk | contribs) (Fixed markup error in example)
Jump to navigation Jump to search

More ADR examples

LOCALITY and other ADR fragments

Using the adr microformat should not just be limited to full datasets of information. In some cases, people reference regions or localities sans any additional information.

By marking these cases up, use of microformats, (particularly adr), will skyrocket.

For instance - with the below post, we reference a city but nothing else. Because I marked up the city name with the locality property, I added the adr property to the block-level parent element that contains the relevant locality property.


<p class="adr">Unbelievable. Yesterday's high temperature in <span  
class="locality">Salem</span> it was 57 degrees out. </p>

Use of the <abbr> element

Semantically-correct adr markup would use the <abbr> element while using the region, country-name and perhaps other adr properties.


<abbr class="region" title="California">CA</abbr>,
<abbr class="country-name" title="United States">US</abbr>

For the full country names in the title attribute of the <abbr> element when using the country-name property, use ISO 3166-1.