[thelist] replace <b> with <strong> (why dont use b tag)]

Mark Howells webdev at mountain.ch
Wed Jul 31 11:33:00 CDT 2002


> Question: Is <span> a "good" or "bad" element? I mean this less in the sense
> of "does it validate as XHTML" but more in the sense of "is it in the spirit
> of expressive markup".
>
> Should it be used only for visual styling where the actual semantic meaning
> is irrelevant, as in the Mad Magazine example? (great example, BTW)

Yes, or for the times when you'd like to apply a <span title="Pop-up help
text functionality in IE">tool-tip</span> to a piece of text that has no
structural meaning outside the browser.

> I've used spans a lot when I wanted to style something and didn't want the
> built-in line breaks that come with divs or paragraph elements.

That's one of the reasons that many developers use <span> incorrectly, as a
visual heading cue. The best piece of advice I've read recently is to build
a site using structurally correct HTML pages, applying the CSS at the end of
the process. Any spacing which can't be eliminated around a heading or <div>
tag with CSS should be accepted as a characteristic of a browser -- most
modern browsers can manage spacing around heading elements with CSS. Those
which can't -- now in the vast minority -- will still be able to approximate
the intended layout without screwing it up too much, if your layout is as
flexible as it should be if you're designing for web media.

> So what's the verdict? Thumbs up or down?

Up, if it's used correctly.

Aardvark ??

Regards
Mark Howells
<http://www.mark.ac/evl/>




More information about the thelist mailing list