xhtml bad boys/the address tag
When trying to be a modern web designer, you will learn about web standards. You will learn why web standards are necessary and how machines differ from us humans. You will learn about screen readers and people with disabilities browsing the web. You will learn about semantics and syntax. You will learn how to be a good boy building web sites.
If you keep on learning and become a prime student, you will have a chance at becoming a standardista. At that moment, you can start preaching standards to other people and continue the legacy of well-coded websites. But let's be honest. Coding to the standards all the time can become a bit ... boring. I'm not surprised that the standardista seem to quench their thirst for rebellion in other areas.
Personally, I think it's not too bad to let go of the standards once in a while, no matter how trivial the example. Remember how html5 was built (amongst others) upon the principal of paving the cow paths? Well, from time to time, try to be that cow, trampling those paths.
the address tag
So where is this all going? Well, the first thing I did when I got into semantics was visit w3schools to check up on the available xhtml tags. One of the tags that caught my attention was the address tag. Something I could most definitely use, or at least, so I thought. It wasn't until a later discussion that I went over to the w3c site to check the actual definition of the tag:
quote 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. This element often appears at the beginning or end of a document. unquote
To be honest, after reading the definition five times, I still wasn't sure what it actually meant. Apparently, the purpose of the address tag is to provide a means of contact for a specific piece of information on the document. Although the definition is actually vague enough to suggest it can be used for any address stated within a document, the example given on the w3c site suggests no such thing. Enter w3schools:
quote Note: The address tag should NOT be used as describing a postal address, unless it is a part of the contact information. unquote
It seems the address tag is intended for visitors willing to contact the author of the web document. Now I'm sure that it has its uses, but in all the sites I've built so far I haven't come across one single instance where I could make use of the tag as intended. As for actual addresses, I've seen plenty.
so uhm, yeah
Well, no offense meant to the parties involved, but I think the definition stated on the w3c site is utter bollocks. When I see an address tag, I expect it to be used for marking up an actual address, not for general contact information regarding the author of the document. So in this particular case, I happily tried to be one of the cows. Hence the standard code piece I use to mark-up addresses in a web document:
<address>
<span class="street">...</span>
<span class="city">...</span>
<span class="country">...</span>
</address>
I do hope it's clear enough that this article is written with a touch of irony, and that it's best to stick to the standards, but at the same time I don't think it's bad to question those same standards and go against them when not too harmful. In the case of the address tag, I think they've made an interesting sounding tag and botched it up with a definition that is incredibly limited and even misleading. Maybe machines can understand it, I as a human sure don't.
Be true to the standards, but try to be a bad boy once in a while. If anything, it's more fun that way. Just don't turn into a second Microsoft.

Comments
Tom
Stumbled across your site via a webstandardsgroup.org mail list. Nice site and articles.
I've just, literally this morning, place on a contact page for an organisation, several different addresses for their different offices. I've used the (gasp) address tag. Now is that right? Seems to make sense from a code point of view anyway. Style them up nicely (or ugly if you wish) with CSS, lob in some MicroFormat tags and you're away.
Niels Matthijs
Well, if you follow the standards to the letter, you're not doing it right. But like you said, using them to mark up an address is just way more logical.
I wouldn't feel bad if I were you, many people don't even realise the real purpose of the address tag. That alone means the definition of the address tag is more than a little confusing.
Roel Van Gils
You're right that the address element is not intended to mark up actual street addresses (not that any human visitor, screenreader or search bot will care if you do, but that's a different story) ;)
However, if you're looking for a clean and 'semantic' way to markup street addresses, you should have a look at the hCard microformat: http://microformats.org/wiki/hcard.
Niels Matthijs
Ah yes, hCards. I know I should look into them some more, but the whole microformat project puts me off somehow.
The thing bothering me the most though, is that the microformat would actually be more semantic when it would use the address tag instead of div class="adr". Using class names instead of html elements actually decreases the semantic value of an element. Of course, the address tag is not intended to mark up addresses, but the whole microformats projects could've been an awesome cow.
But I should probably get over it and just go for address class="adr" and kindly ignore the useless class in favor of the added usability benefits of the hCard :)
Roel Van Gils
I see what you mean :) It's true that mf class names aren't the 'cleanest' ones that one could come up with, but they are in fact the most machine readable means to markup addresses. And isn't that what HTML is intended for: to be readable and interpretable by machines? ;) You could argue that it's sad that we can only accomplish this by sneaking some 'pseudo' markup conventions into our XHTML (namely 'Microformats'), but you'll find that they are it's surprisingly powerful and useful if you look into their possibilities: http://microformats.org/
If you're on Mac, you should give the excellent Safari plugin by Kasper Nauwelaerts (yup, he's Flemish) a try :) http://zappatic.net/safarimicroformats/. If you're on Windows, they're plenty of bookmarklets, firefox add-ons etc. for you to experiment with :)
Niels Matthijs
I recognize the actual use of microformats, I'm just a bit disappointed by most implementations. But like I said, time to get over that and try to make use of them as good as possible, luckily there's room enough for improvement (as they don't force specific html tags). Expect my next project to make use of them ;)
Roel Van Gils
Cool ;)
Martin Fleming
Ive fallen into the trap before of using address incorrectly. The problem is, while it is not intended for use as a postal address, what actually is?
What I mean is that an address is not a paragraph so can't use the p tage and by wrapping it in span tags for our beloved microformats, its the class names that provide the semantics not the tags itself as span is just an empty container.
I really believe the address tag should be used for exactly what it says, an address, after all W3C only provide recommendations at the end of the day.
Ryan Williams
I disagree with the notion of using the address tag for postal addresses because it's simply not what the tag is defined as being used for, which compromises the ability for the semantic data to be used meaningfully.
For example, search engines could provide a small bit of info next to search results that provides the author of the page; however, they can't realistically do this if everyone is using the tag to fill out great big postal addresses. The search engine will see this multi-line monster in the address tag, decide it's too big to be used, and discard it and treat it like regular text. The semantic value is lost.
Likewise, web browsers in the future could somehow integrate the author data into the browser interface somehow, or something like that. Just think: what kind of things could a 'author of this page/content' declaration be used for in the future by various web applications and software? It allows a machine to be told who wrote something, rather than relying on a human to look at the 'This post was written by Niels Matthijs' list item tag. Exactly the kind of thing semantic markup is meant to allow.
A comparison to this is using the h1 tag to mark up every single top-level heading on your page, whether it's the heading of a menu section, header of a footer, header of a comment, etc. While this may technically make sense and looks good in the code, robots will get confused by this and find it hard to discern which h1 is meant to be the actual heading of the document's content (which is what the tag is designed for). Again, how could this data be used if it weren't for all the inappropriate usage that exists (primarily by 'SEO' guys)?
It's important to remember that markup is primarily there to assist machines, not humans. While well-presented markup is good for editing, if this crosses over into using inappropriate markup for the data at hand then you're doing it wrong — simple as that. Your personal opinion of whether or not the tag is well named is irrelevant; admit you mistakenly used a tag in the incorrect context and move on. Otherwise you're no better than the developers of IE, who also opted to bend the standards to their own desires.
Niels Matthijs
Whether the tag is well named is certainly relevant. If we can't use an address tag to mark up an address there is something wrong with the semantics we're using. Of course machines won't care, but that doesn't mean we should switch the meaning of div and table simply because they won't notice.
You said it yourself, the address tag is used to mark up "author contact" information. Why not name it "author" then ? I fully recognize the benefit of semantics but not to the point where I will follow them blindly.
Ryan Williams
It's more a vestige of computer convention that led to 'address' being used. If you look up the etymology of the term in a computing context you'll find that it was once quite commonly used to reference names, authors, and identifiers — albeit not often in a website context.
I agree that tags should ideally echo their intended purpose, but this is more a case of definition (and you possibly not being aware of it) than bad naming. Perhaps using a term more people understand would be preferable for sure, but it's not a completely inappropriate tag name.
Regardless of our opinion though, the specification dictates how it should be used and we should adhere to that. Why exactly proclaim to be interested in standards if you're not going to use the markup as it was designed to be used? As I said above, it's comparable to using a h1 tag for every single heading on your site: it may seem right, but it's not the way the markup is meant to be used. And if you don't adhere to the standards, you're doing it wrong. There is no room for making personal improvements — that's exactly what standardisation is designed to resolve. It's like a hardware manufacturer deciding they're going to make a new type of screw that no screwdriver can use because they think they can do it a little better. Or like a web browser's developers adding loads of new non-standard tags because they think they'd be cool. ;)
The simple fact of the matter is that the address tag isn't meant to be used for providing postal addresses, unless that postal address happens to be the preferred way of contacting the author of that content. The tag has a clear purpose, even if little used.
I can't see why you'd endeavour to break the standards and use the address tag for postal addresses anyway. Using the tag carries no value in itself because it doesn't automatically add line breaks or anything else that might improve address formatting, nor does it significantly aid code readability because a postal address is clearly a postal address regardless of what tag's wrapped around it; it doesn't even affect how visitors see the address in any way. Its one and only function on a HTML level is to tell machines that the text contained defines the author of a piece of content or document — period.
This information may not be used very much by machines (applications, etc) at the moment, but that's not our issue as front-end developers. We should just use the markup as it was intended to be used and leave personal grievances with the standards out of the equation.
Niels Matthijs
Basically, if you want cow paths to be paved, cow paths have to be created first. If many people start doing this, the people higher-up will notice that something is brewing and they can respond to it if they like.
I understand your reasoning, but what's bothering me is that a postal address on a site is often way more important than contact information for the site owner. Now we're stuck with microformats to mark up a postal address because there's no other way to mark up such addresses, even though there is an "address" tag in the specification. If you ask me, that's just plain silly.
It's true that standards are there for a reason, but they should also be questioned. And if many people ignore a certain standard, they will be questioned by those who have the power to change things.
Ryan Williams
HTML specifications aren't really decided like that, though — it's a large committee that dictates the direction of the standard. Just going ahead and being part of a minority that incorrectly uses the tag and thus breaks standardisation isn't really the way forward; instead, you should apply for the W3C HTML Working Group and work to change things.
Yes, there is no defined way to mark up postal addresses in HTML, but there are a lot of things that we have nothing to mark up with. Making an exception just because a linguistically similar but etymologically unrelated term exists really isn't the way to go in my opinion. And do you even need a special tag to mark up an address? Is a class not sufficient to describe in the markup what it is? Or even the postal address itself, which is clearly identifiable as one to the human eye?
It's up to you what you actually do, but I'd urge you and anyone else thinking of breaking standards to not do so. It will not help in the long run and is the wrong mentality to take. Again, in my opinion.
Niels Matthijs
Looking at the way html5 was developed, that's exactly the way some standards were changed. The whole "paving the cow paths" concept was a very important part of that. Also, I don't think it's really a minority that's abusing this tag, though I don't have any hard statistics to prove that.
It makes a lot of sense to me, as addresses are often a very important part of the content, and often the sole reason people are visiting a webpage (certainly when dealing with sites for governments, cities or towns). Don't forget that we now "abuse" classnames to add extra semantic value to elements, something that should be reserved for tags only.
I could see great value in tools that could filter out all addresses from a page/site and list them in some way, which would be a lot easier if there were a standardized address tag (instead of the shakey microformats definition we have now).
Oh, and one final quote from the last paragraph of my article:
Jordan Clark
I've always used the
addresselement to mark up the author of the current document, as demonstrated in the footer of the W3C home page. The HTML 5 draft also takes this view, but is more strict in its approach — for example, including other information, such as the document's modification date, is not allowed (something the W3C tend to do quite a lot).Salt Websites
I agree, I've never built a site where I needed the tag. But I've thought about a good use - articles and article directories. Often articles guest-posted on other sites or on article directories contain a "bio section" at the end - example. Would it be appropriate to put the author's name and website in there? Even bio information?