h-adr: Difference between revisions

From Microformats Wiki
Jump to navigation Jump to search
(corrected person => postal address)
(editorial, move backcompat to its own section at the bottom)
Line 2: Line 2:
<span class="h-card vcard"><span class="p-name fn">[[User:Tantek|Tantek Çelik]]</span> (<span class="p-role role">Editor</span>)</span>
<span class="h-card vcard"><span class="p-name fn">[[User:Tantek|Tantek Çelik]]</span> (<span class="p-role role">Editor</span>)</span>
----
----
<dfn style="font-style:normal;font-weight:bold">h-adr</dfn> is a simple, open format for publishing postal address information on the web. h-adr is one of several open [[microformats|microformat]] draft standards suitable for embedding data in HTML/HTML5.
<dfn style="font-style:normal;font-weight:bold">h-adr</dfn> is a simple, open format for publishing structured locations such as addresses, physical and/or postal. h-adr is one of several open [[microformats|microformat]] draft standards suitable for embedding data in HTML/HTML5 on the web.


h-adr is the [[microformats-2]] replacement for [[adr]]. It is most commonly used as part of an [[h-card]] or [[h-event]].
h-adr is the [[microformats-2]] update to [[adr]]. It is most commonly used as part of an [[h-card]] or [[h-event]].


== Example ==
== Example ==
Line 10: Line 10:


<source lang=html4strict>
<source lang=html4strict>
<p class="p-adr h-adr">
<p class="h-adr">
   <span class="p-street-address">17 Austerstræti</span>
   <span class="p-street-address">17 Austerstræti</span>
   <span class="p-locality">Reykjavík</span>
   <span class="p-locality">Reykjavík</span>
Line 21: Line 21:
The class '''<code>h-adr</code>''' is a ''root class name'' that indicates the presence of an h-adr.
The class '''<code>h-adr</code>''' is a ''root class name'' that indicates the presence of an h-adr.


'''p-street-address''', '''p-extended-address''' and all the other h-adr property classnames define an element as a ''property'' of the h-adr.
'''p-street-address''', '''p-locality''', '''p-country-name''', '''p-postal-code''' and all the other h-adr property class names listed below define properties of the h-adr.


See [[microformats-2-parsing]] to learn more about property classnames.
See [[microformats-2-parsing]] to learn more about property class names.


== Properties ==
== Properties ==
 
Inside an element with class '''h-adr''':
* '''<code>p-street-address</code>''' - house/apartment number, floor, street name
* '''<code>p-street-address</code>''' - house/apartment number, floor, street name
* '''<code>p-extended-address</code>''' - additional street details
* '''<code>p-extended-address</code>''' - additional street details
Line 40: Line 40:
* '''<code>p-altitude</code>''' - metric altitude
* '''<code>p-altitude</code>''' - metric altitude


== Status ==
'''h-adr''' is a microformats.org draft specification. Public discussion on h-adr takes place on [[h-adr-feedback]], the #microformats [[irc]] channel on irc.freenode.net, and [http://microformats.org/discuss/mail/microformats-new/ microformats-new mailing list].
h-adr is ready to use and implemented in the wild, but for backwards compatibility you should also mark h-adrs up with classic [[adr]] classnames.
== Property Details ==
(stub, add any property explanations here)
== Examples in the Wild ==
* … add any h-adr examples you find in the wild
== Backward Compatiblity ==
=== Publisher Compatibility ===
For backward compatibility, you may wish to use classic [[adr]] classnames in addition to the more future-proof h-adr properties, for example:
For backward compatibility, you may wish to use classic [[adr]] classnames in addition to the more future-proof h-adr properties, for example:


Line 46: Line 59:
</source>
</source>


=== Parser Compatibility ===
Microformats parsers should detect classic properties and parse them as microformats 2 properties. If an "h-adr" is found, don't look for an "adr" on the same element.
Microformats parsers should detect classic properties and parse them as microformats 2 properties. If an "h-adr" is found, don't look for an "adr" on the same element.


Line 59: Line 73:
* postal-code
* postal-code
* country-name
* country-name
== Status ==
'''h-adr''' is a microformats.org draft specification. Public discussion on h-adr takes place on [[h-adr-feedback]], the #microformats [[irc]] channel on irc.freenode.net, and [http://microformats.org/discuss/mail/microformats-new/ microformats-new mailing list].
h-adr is ready to use and implemented in the wild, but for backwards compatibility you should also mark h-adrs up with classic [[adr]] classnames.
== Property Details ==
(stub, add any property explanations here)
== Examples in the Wild ==
* … add any h-adr examples you find in the wild


== Background ==
== Background ==
h-adr is based on the existing [[adr]] specification, which was extracted from [[hCard]] in order to allow it to be used for applications other than contact information.
h-adr is based on the existing [[adr]] specification, which was extracted from [[hCard]] in order to allow it to be used for applications other than contact information.


== See Also ==
== See Also ==
* [[microformats-2]]
* [[microformats-2]]
* [[h-geo]] can be nested in h-adr
* [[h-geo]] can be nested in h-adr
* [[h-card]] and [[h-event]] often contain h-adr
* [[h-card]] and [[h-event]] often contain h-adr

Revision as of 23:45, 14 June 2013

<entry-title>h-adr</entry-title> Tantek Çelik (Editor)


h-adr is a simple, open format for publishing structured locations such as addresses, physical and/or postal. h-adr is one of several open microformat draft standards suitable for embedding data in HTML/HTML5 on the web.

h-adr is the microformats-2 update to adr. It is most commonly used as part of an h-card or h-event.

Example

Here is a simple postal address example:

<p class="h-adr">
  <span class="p-street-address">17 Austerstræti</span>
  <span class="p-locality">Reykjavík</span>
  <span class="p-country-name">Iceland</span>
  <span class="p-postal-code">107</span>
</p>

Get started

The class h-adr is a root class name that indicates the presence of an h-adr.

p-street-address, p-locality, p-country-name, p-postal-code and all the other h-adr property class names listed below define properties of the h-adr.

See microformats-2-parsing to learn more about property class names.

Properties

Inside an element with class h-adr:

  • p-street-address - house/apartment number, floor, street name
  • p-extended-address - additional street details
  • p-post-office-box
  • p-locality - city/town/village
  • p-region - state/county/province
  • p-postal-code - postal code, e.g. ZIP in the US
  • p-country-name - country name
  • p-label - new in vCard4 (RFC6350)
  • p-geo (or u-geo with a RFC 5870 geo: URL), optionally a nested h-geo
  • p-latitude - metric latitude
  • p-longitude - metric longitude
  • p-altitude - metric altitude

Status

h-adr is a microformats.org draft specification. Public discussion on h-adr takes place on h-adr-feedback, the #microformats irc channel on irc.freenode.net, and microformats-new mailing list.

h-adr is ready to use and implemented in the wild, but for backwards compatibility you should also mark h-adrs up with classic adr classnames.

Property Details

(stub, add any property explanations here)

Examples in the Wild

  • … add any h-adr examples you find in the wild

Backward Compatiblity

Publisher Compatibility

For backward compatibility, you may wish to use classic adr classnames in addition to the more future-proof h-adr properties, for example:

<span class="p-street-address street-address">123 Main St.</span>

Parser Compatibility

Microformats parsers should detect classic properties and parse them as microformats 2 properties. If an "h-adr" is found, don't look for an "adr" on the same element.

Compatibility root class name: adr

Properties: (parsed as p- plain text unless otherwise specified)

  • post-office-box
  • extended-address
  • street-address
  • locality
  • region
  • postal-code
  • country-name

Background

h-adr is based on the existing adr specification, which was extracted from hCard in order to allow it to be used for applications other than contact information.

See Also