Semantic HTML 5? Pfft.
Reading though a preview of the HTML 5 specification over at A List Apart, I was somewhat surprised by the names chosen for two new HTML elements:
footer. Like many other standards aware web designers I have worked hard to train myself out of the habit of naming divs non-semantically, only to discover that HTML 5 will undo all of my good work.
Let me explain what I mean.
Instead of naming a
div based on where it appears within my layout, I try to name it based on the content it describes. For example, rather than markup a site’s header as:
I mark it up as:
and instead of:
The idea is that in the absence of meaningful, semantic HTML elements with which to markup content I use the most descriptive CSS id name I can think of.
How ironic then, that the new HTML 5
footer elements describe content based on where it appears on the page, rather than what it means.
Update 08 Dec 2007: I thought it was worth mentioning that the branding/siteinfo naming structure isn’t one I came up with myself – it is suggested by Andy Clarke in his book Transcending CSS.