After years of personal embarrassment I finally managed to update look and code of my website. This actually happened last week and I wanted to write this post sooner, but other things came in-between. There are still bugs I need to fix (iPad footer is better than it was, but not fine), but overall I’m pretty happy with how it turned out.
This was a second site I built using
media queries
and I learned lots. When I learn a bit more about mobile web, I might write a post about few gotchas for new developers, but this is not that post. This post is about
<address>
tag because it bugged me when I made that first design and I spent a remarkable amount of time on it again.
My problem with it came down to its definition.
<address>
can be used only to mark up contact information about content’s author. In HTML 4 this was limited to authorship of whole page. For HTML5 it
was “widened”
to authorship of sectioning element like
<article>
(so if you have more than one article on page, each can contain its own, different, address for its author). You can’t however mark any address with it and after lots of searching I found
this old message
from
Ian Hickson
which explains why (I’m not aware of any later clarifications).
I don’t agree with everything said. Mostly correct use is not necessarily a proof of well-designed element. My bet would be that
<address>
was a rather unknown tag exactly because of its limited use and was thus used mostly by those that dig deeper into standards, which sound also like people who care how things are used as expected.
Still most points are valid. Loosening definition would make it less meaningful. There are microformats that you can use instead and most annoying problems (allowing only inline content) have been fixed. We also have better tools for parsing HTML so it really doesn’t matter much if its definition feels completely right or not. It’s good enough.
At the end I still decided to mark my contact information on
my homepage
with
<address>
anyhow (augmented with
hCard
), because I am after all the sole author of this website.