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

aardvark roselli at earthlink.net
Wed Jul 31 14:08:07 CDT 2002


> From: David.Cantrell at Gunter.AF.mil
>
> 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".

i consider both <span> and <div> to be, for the most part, easy
ways out of finding more appropriate structural tags...

i want to kick developers who use <div> where <p> should be
used... on my own site, i only have four <div>s (one for nav, one for
breadcrumb, one for footer, one for content - none nested) and no
<span>s...

with all the writing i've done and odd styles i've played with, i have
found *very* few cases where a <span> was the best tag for the
job...

i generally feel the same about <div>s... for every site that uses
excessive tables for layout, you'll easily find a site that uses
excessive <div>s for layout... those same site usually use
<span>s like they're going out of style (get it?)...

> Should it be used only for visual styling where the actual semantic
> meaning is irrelevant, as in the Mad Magazine example? (great example,
> BTW) Obviously "only" is a strong word, but I'd like to hear more
> opinions on this.

it could be argued that <span> has more right to be there than
<b>, since <b> implies bold, while <span class="hey"> can later
be used to make it red, or something without overriding the bold
style inherent in the <b>...

but i avoid <span>, and i avoid class elements in my copy...  you'll
note on my site that it's rare for me to class an element in the body
of the page... this is partly borne from developing a CMS where i
know the MSHTML control will just munge styles and not allow
authors an easy way to insert them, and partly from trying to make
my content as pure as possible and use robust CSS selectors to
handle for all situations...

not to mention it also imparts a certain degree of consistency...

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

for me, it's a hearty thumbs-down on <span>, but only because i
feel there is usually an appropriate semantic/structural element
hiding in HTML/XHTML somewhere...

now, if my pages were XML and CSS (not XSL), then <span>
would be grounds for dismissal since there would be *no* reason to
do that... maybe... i'll have to think on that...


--
Read the evolt.org case study
Usability: The Site Speaks for Itself
http://amazon.com/exec/obidos/ASIN/1904151035/evoltorg02-20
ISBN: 1904151035



More information about the thelist mailing list