Here is what the HTML5 spec says:
- The
address
element represents the contact information […]- The
address
element must not be used to represent arbitrary addresses […]
Isn't it ridiculous? They say "Don't use <address>
for address". Why would they name that element address then? Maybe they had to name it <contacts>
?
They say: "The p
element is the appropriate element for marking up postal addresses in general" but hey, the <p>
element is appropriate for anything then. It can be a piece of novel …
If you want to markup a company postal address in their site's footer what do you use? Just <p>
? I don't think it's a paragraph there, do you?
Hum... when you quote the specs, don't remove the relevant parts (emphasis is mine):
As I understand this :
The address element must not be used to represent arbitrary addresses (e.g. postal addresses), unless those addresses are in fact the relevant contact information for the nearest article or body element ancestor.
Is it still unclear ?
Regarding company address in footer : it is ok to use the <address> tag if the nearest article or body element ancestor is about the company.
You must use the <p> tag for addresses that are not related to the nearest article or body element ancestor.
The basic markup for postal addresses is a
p
element withbr
elements for separating the lines.The
address
element conveys additional information, namely, that this postal address is (part of) the contact information for anarticle
(if there is one) or thebody
(if there is no parentarticle
).So in both cases you should have the same markup for postal addresses, either with or without
address
container (depending on the purpose of the postal address).In your specific example (company address in the footer of the company’s website), you should use the
address
element, because your company is the relevant contact for the webpage. Note that thisaddress
could also contain your company’s email address, telephone number etc.Why the element is named
address
instead ofcontacts
?Probably because the element name was adopted from previous non-HTML specifications (and maybe its purpose/meaning was redefined at some point discussing HTML).
On Early History of HTML it says in the "Pre-1990: GMLguide and GML" section that the "Waterloo SCRIPT GML User's Guide" (some kind of predecessor to SGML) from 1988 mentions several tags that are now used in HTML, too, and among them is
ADDRESS
.But it doesn’t really matter. While descriptive element names are helpful, they are not required. The semantics are defined by the HTML specification, not by the element names.
Looking at the various HTML versions, we can see that it was never intended to be used for every kind of postal address:
address
in HTML5.1 (draft): "contact information"address
in HTML5: "contact information"address
in HTML 4.01: "contact information"address
in HTML 4.0: "contact information"address
in HTML 3.2: "authorship and contact details"address
in HTML 3.0 (draft): "address, signature and authorship"address
in HTML 2.0: "address, signature and authorship"address
in the first HTML draft: "address information, signatures, etc"