On the surface, addr produces a fairly straightforward inline element used to indicate an address. As noted at HTML5 Doctor, though, too many of us use it too freely, and thus, incorrectly. The reason is that the element is supposed to be restricted to a web page’s author’s contact information.
Here are a few basic examples, albeit used improperly.
- Triangle Shirtwaist Factory Fire 29 Washington Place, New York, NY 10003
- Haymarket Affair
175 N Desplaines St
Chicago, IL 60661
<ul> <li>Triangle Shirtwaist Factory Fire <addr>29 Washington Place, New York, NY 10003</addr></li> <li>Haymarket Affair<br /><addr>175 N Desplaines St<br />Chicago, IL 60661</addr></li> </ul>
The addr element is supposed refer to contact-related data for an author or editor of a webpage. It is like very flexible metadata for a webpage. The data contained within addr tags can be quite broad and is certainly not limited to a postal address. It can include an email address, telephone or fax number, or any other contact-related data.
In the examples above, I have used the address element incorrectly. While the syntax is correct, the context or usage is wrong. And, the reason the usage is wrong is because the addresses listed have nothing to do with the me, the author of this webpage.