adr-examples: Difference between revisions
B.K. DeLong (talk | contribs) mNo edit summary |
(fixed use of "country" to be "country-name") |
||
Line 22: | Line 22: | ||
Semantically-correct <strong>adr</strong> markup would use the <code><abbr></code> element while | Semantically-correct <strong>adr</strong> markup would use the <code><abbr></code> element while | ||
using the <em>region</em>, <em>country</em> and perhaps other <strong>adr</strong> properties. | using the <em>region</em>, <em>country-name</em> and perhaps other <strong>adr</strong> properties. | ||
<h3>Example:</h3> | <h3>Example:</h3> | ||
Line 28: | Line 28: | ||
<pre><nowiki> | <pre><nowiki> | ||
<abbr class="region" title="California">CA</a>, | <abbr class="region" title="California">CA</a>, | ||
<abbr class="country" title="United States">US</abbr> | <abbr class="country-name" title="United States">US</abbr> | ||
</nowiki></pre> | </nowiki></pre> | ||
For the full country names in the <code>title</code> attribute of the <code><abbr></code> element when using the <em>country</em> property, | For the full country names in the <code>title</code> attribute of the <code><abbr></code> element when using the <em>country-name</em> property, | ||
use [http://www.iso.org/iso/en/prods-services/iso3166ma/02iso-3166-code-lists/list-en1.html ISO 3166-1]. | use [http://www.iso.org/iso/en/prods-services/iso3166ma/02iso-3166-code-lists/list-en1.html ISO 3166-1]. |
Revision as of 17:01, 18 January 2006
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.
Example:
<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.
Example:
<abbr class="region" title="California">CA</a>, <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.