Re: class attribute deprecated with <span>?

On 2/10/03 9:14 AM, "Sharon_Correll@sil.org" <Sharon_Correll@sil.org> wrote:
> 
> This is the 4th edition of _HTML and XHTML: The Definitive Guide_, by Chuck
> Musiciano and Bill Kennedy, page 300 (Chapter 8: Cascading Style Sheets,
> section 8.5, last paragraph). It says:
> 
> Although deprecated, the <span> tag also supports the standard tag
> attributes. The style and class attributes, of course, let you control the
> display style; the id and title tag attributes let you uniquely label its
> contents; the dir and lang attributes let you specify its native language;
> and the many on-event attributes let you react to user-initiated mouse and
> keyboard actions on the contents. Not all are implemented by the currently
> popular browsers for this tag or for many others.

My copy of the 4th edition says the exact same thing except that it's
missing the words, "Although deprecated". I just checked the errata online
http://www.oreilly.com/catalog/html4/errata/ and verified that there were
changes made in various printings. Yours is actually a later printing than
mine. http://www.oreilly.com/catalog/html4/errata/html4.301

> Okay, maybe that's not saying the use of style and class are deprecated
> with <span>, but if not, I don't know what it's saying!

The authors are saying that the <span> tag was deprecated, not it's
attributes. From more reading on the subject, it is my understanding that
<span> was deprecated due to the fact that it has no semantic meaning. It is
still supported in XHTML 1, but as far as I know, it will be considered
invalid in XHTML 2.0 because of that very reason. Feel free to correct me if
you find otherwise.

As Christian pointed out, title is not a unique identifier, but that
sentence could be open to interpretation. Perhaps the sentence should be
phrased, "the id and title tag attributes let you uniquely identify and
label its contents, respectively". However, the authors fully explain the
use of title and id in other parts of the book so this probably won't cause
confusion to someone who has read the whole book.

James
 

Received on Monday, 10 February 2003 20:35:57 UTC