W3C home > Mailing lists > Public > www-style@w3.org > February 2003

Re: class attribute deprecated with <span>?

From: Rijk van Geijtenbeek <rijk@iname.com>
Date: Fri, 07 Feb 2003 20:57:20 +0100
To: "www-style.w3.org" <www-style@w3.org>
Message-ID: <oprj8ppul8ppt21i@smtp.concepts-ict.nl>

On Fri, 7 Feb 2003 11:19:16 -0600, <Sharon_Correll@sil.org> wrote:

> I'm reading the "HTML and XHTML" book by Musiciano and Kennedy, published
> by O'Reilly. It says that it is deprecated to use style, class and id
> attributes with the <span> tag.  (This is on page 300.) However, I notice
> on the CSS web site that there are a number of examples of using <span>
> this way.
>
> Is this really deprecated?

No. See the HTML spec:
http://www.w3.org/TR/html4/index/attributes.html

As long as there no 'D' in the column 'Depr.', the attribute is not 
deprecated. Only 'name' is deprecated.

> If so, why, and what is the accepted way to
> apply formatting to a short range of text?

If one of the more semantic elements is not suitable, using SPAN is fine.

-- 
Rijk van Geijtenbeek
Received on Friday, 7 February 2003 14:58:46 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:19 GMT