HTML5 has nothing to do with this.
The nav tag does nothing special here. It’s just extra markup you’d only be adding to your navigation lists to make browsers know it’s a navigation list, as opposed to some other kind of list. I personally prefer
<ul id=“mainMenu” role=“navigation”>
since today this does exactly the same thing without extra tags (in the future maybe other technologies won’t read the role and will only look for actual <nav> tags).
I would never recommend actually “replacing” real meaningful text with an icon.
You cannot guarantee users actually see icons. They may be blind. Images may not load. What you think looks very clearly like a house-meaning-“home” might really not to a user (at least “home” has a large precedence, being available in graphical browsers for years, but I suspect “Home” isn’t the only link you’d like to iconise).
I would avoid using specific naming like “about” or “home” because what if those links change in a redesign?
I don’t understand this? If you have an “about” icon (wth would that look like, anyway?), doesn’t it depend on being on the “about” link? If the author is using image-replacement, these images aren’t decoration, but content. So they do matter what they are linked to. If the links change in a redesign, don’t the icons have to change as well? You wouldn’t want a “home” icon moved to representing the “products” link would you?
But I may be misunderstanding the OP here. Image-replacement and/or sprites is a CSS thing, and while there are quite a few techniques for it floating around, I don’t know of any that have changed due to the HTML5 spec appearing.
What would be the leanest way to do this using the html5 nav tag?
<nav>
<a href=“#”>Home</a>
<a href=“#”>About</a>
<a href=“#”>Contact</a>
</nav>
I still believe a list of navigation links belong in a list, myself…
i.e. what would css look like?
The same.
Well you had:
ul#nav li a.home {
Which could have just been
#nav .home {
but so assuming you want to have a nav tag with a bunch of loose links inside, you’d still need to differentiate which anchor gets the home icon
<nav>
<a href=“#” class=“home”>link</a>
…
so you’d still have at least
nav .home {
blah blah
in your CSS. This means the CSS parser will look for anything with a class of “home” that is a descendant of any element called “nav”. Chances are you’ll have an id or a class on that nav element anyway for styling it on the page, so if you had
<nav id=“main”>
<a href=“#” class=“home”>home</a>
…
then you’d still have
#main .home
And yeah, I’m leaving out the spans but Gilder-Levin is my favourite technique so my markup would still have them in there… after all, someone still needs to hold that image.