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

Re: [css21] multiple ID attributes with the same value

From: Ian Hickson <ian@hixie.ch>
Date: Mon, 14 Feb 2005 16:54:57 +0000 (UTC)
To: Philip TAYLOR <P.Taylor@Rhul.Ac.Uk>
Cc: Laurens Holst <lholst@students.cs.uu.nl>, www-style@w3.org
Message-ID: <Pine.LNX.4.61.0502141645290.11485@dhalsim.dreamhost.com>

On Mon, 14 Feb 2005, Philip TAYLOR wrote:
> > 
> > It is _much_ _much_ more common for people to abuse the "class" 
> > attribute than the "id" attribute. In fact abuse of "id" is rare.
> Maybe.  But it exists [...]

Sure. But I don't see that this misuse deserves to have every UA change to 
discourage it. That's a very expensive move for a very minor issue.

> How does one abuse a "class" attribute, btw ?

   <div class="body"> ... </div>
   <div class="important"> ... </div>
   <p class="bullet"> ... </p>
   <div class="item"> ... </div>
   <span class="green"> ... </p>
   <span class="invisible"> ... </span>
   <a class="bannerLink" ...> ... </a>
   <p class="small"> ... </p>

...etc. Basically, any time someone uses the class attribute for 
presentational reasons ("bullet", "green", "invisible", "small"), and any 
time someone uses the class attribute when HTML provides means to provide 
the actual semantics ("body", "important", "item", "bannerLink").

(Several of the examples above are from the http://www.w3.org/ home page.)

Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Monday, 14 February 2005 16:55:00 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:17 UTC