Yeah, I see my first post may be a little too short.
First off, whenever I see a <div> or a <span> my ears perk up. They're the most over- & wrongly used markup by people trying to do "the right thing;" since they don't particularly affect the design, people think they don't mean anything (admittedly, they don't mean much, but they're still over used since more appropriate tags usually do exist or they're just there to achieve an effect). In my view, it's just as bad as misusing tables--it's the same motive, in fact.
So, applying this to Zeldman's site, we first have to establish what he was trying to say. I'll take on the logo banner first:
Code:
<div id="newmenu">
<div id="bannerlogoban">
<a id="logoban" href="/" tabindex="1"
title="Zeldman.com. Web design news and entertainment since 1995.">
<span class="alt">Zeldman.com. Web design news and entertainment
since 1995. ISSN #1534-0309.</span>
</a>
</div>
</div>
The first #newmenu is completely useless & redundant to it's child, and the second <div> should be marked up as a paragraph or headline since those're more accurate (or it could be included in the #secondarynav list right beneath it--probably the most preferable solution, actually).
On the actual effect, the title of the anchor is redundant to its content. Inside the anchor, the <span> is only there to accomplish the effect--it serves no actual structural purpose--and it's just imitating the behavior of at least two existing elements (quite knowingly too, or it's unlikely that he'd have used the same abbreviation: "alt"). On top of this, the "alt text" is the exact same text as on the image, which for the most part is just text without "special treatment"--easily done with CSS.
If it is really that important to not have protruding strokes on the Ms in "zeldman.com" (& I don't think it is, but that's just me) then that text should be an image (with the appropriate alt text) and the "eye" could either be on the same logo image or put in the background somewhere. There is absolutely no reason for the "Web design news ... ISSN #1534-0309." portion to not be plain text, however. As text, "zeldman.com" should probably be marked up as <em>, <strong> or a handful of the other phrase elements--even <span id="logo">.
Moving onto the ALA/Happy Cog/WThRemix buttons, they face the same problems as the masthead, but text wouldn't work there so there's no problem with using images. For both the masthead and the buttons, he uses CSS :hover to load an alternative image, but onmouseover/onmouseout are both legal in XHTML & probably just as appropriate. Or, he could stick with :hover and use PNGs with transparency; just change the background color instead of the entire image saving all of us a couple of d/ls.
OK, so that's just semantics, this technique also has practical implications, too. If someone has images turned off (like I did while surfing @ 12k last month
), the CSS is still downloaded, which means that neither the alt text nor the image that replaces it will show up. If someone has visited your site and then you add a button, it probably won't show up either (and neither will the alt text) since the browser can cache the CSS. And there are also the normal issues with using images beyond that, too.
The big problem with all that isn't that it not clever, but that it's too clever--trying to rewrite what already exists. I'd have preferred something more along the lines of:
Code:
<a href="/"><object data="/i/2003/parts/lb2.gif" type="image/gif">
<em>Zeldman.com</em> Web design news and entertainment since 1995.
ISSN #1534-0309.
</object></a>
<!-- or -->
<a href="/"><img src="" alt="Zeldman.com Web design news and
entertainment since 1995. ISSN #1534-0309."/></a>
<!-- or just -->
<a href="/"><em>Zeldman.com</em> Web design news and
entertainment since 1995. ISSN #1534-0309.</a>
<!-- for the buttons -->
<a href="http://alistapart.com"><object data="/i/bans/ala100bano.gif"
type="image/gif">
A List Apart: For people who make Web sites.
</object></a>
<!-- or -->
<a href="http://alistapart.com"><img src="/i/bans/ala100bano.gif"
alt="A List Apart: For people who make Web sites"/></a>
So, did that clarify my position, or do I sound more like a quack than ever? ;-)
~~Ian
Bookmarks