Difference between revisions of "h-adr"
(→Properties: decimal geo props)
(→Publisher Compatibility: wrap back compat example in enough markup for a complete adr)
|Line 56:||Line 56:|
<span class="p-street-address street-address">123 Main St.</span>
<span class="p-street-address street-address">123 Main St.</span
Revision as of 18:39, 18 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.
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>
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 microformats2 parsing specification to learn more about property class names.
h-adr 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- post office mailbox
p-postal-code- postal code, e.g. ZIP in the US
p-country-name- country name
p-label- a mailing label, plain text, perhaps with preformatting
p-geo(or u-geo with a RFC 5870 geo: URL), optionally a nested h-geo
p-latitude- decimal latitude
p-longitude- decimal longitude
p-altitude- decimal altitude - new in vCard4 (RFC6350)
h-adr is a microformats.org draft specification. Public discussion on h-adr takes place on h-adr-feedback, the #microformats #microformats chat 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.
(stub, add any property explanations here)
Examples in the Wild
- … add any h-adr examples you find in the wild
For backward compatibility, you may wish to use classic adr classnames in addition to the more future-proof h-adr properties, for example:
<p class="h-adr adr"> <span class="p-street-address street-address">123 Main St.</span>, <span class="p-locality locality">Pleasantville</span> ... </p>
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)