The Address Element

As Tantek Çelik said in his excellent WE05 presentation, the address element is perhaps the worst named HTML element. I definately agree there. A couple of months have passed since WE05, but it was only yesterday, when I had a chat with my friend Šime, that I realized I didn’t properly understand how the address element should be used.

The address element isn’t for marking up literal addresses, said Tantek. It’s not for marking up all addresses on a site.

So, what’s it for, then? Marking up the contact information for a document.

Here’s a quote from the W3C HTML 4.01 specification:

The ADDRESS element may be used by authors to supply contact information for a document or a major part of a document such as a form.

In his presentation, Tantek also gave us a nice example of using the element:

Please contact
<address>webmaster at example dot com</address>
if you find any problems with this site.

You’ve probably seen something like that in page footers plenty of times.

But wait! One has to feel just a little bit confused by the examples on W3 Schools and HTML Dog. From those, you naturally think it’s OK to use the element on every address you have on a site. They gave general examples and didn’t provide thorough explanations.

I took another listen at the presentation, but Tantek also didn’t go into much detail with this.

More investigation was necessary, and the next Google search shed a lot more light on the subject:

The ADDRESS element provides contact information for a document or part of a document. Information provided by ADDRESS may include the names of the document’s maintainers, links to the maintainers’ Web pages, e-mail addresses for feedback, postal addresses, phone numbers, and so on. The ADDRESS element is not appropriate for all postal and e-mail addresses; it should be reserved for providing such information about the contact people for the document.

So, there you go, a proper explanation, finally!.

Next Post:
Previous Post: