Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #12463

Re: CSS Use of ID

From Norman Peelman <npeelmandog@cfl.rr.com>
Newsgroups comp.lang.javascript
Subject Re: CSS Use of ID
Date 2012-03-06 23:13 -0500
Organization A noiseless patient Spider
Message-ID <jj6n8t$ehq$1@dont-email.me> (permalink)
References <qhabl79jrmuqqhda7kvu7mce8me5n9aoe9@4ax.com> <jj4t42$nq9$1@dont-email.me> <g1pcl7dmstcsqh7c2tqhrsuicdkrbtdbds@4ax.com>

Show all headers | View raw


On 03/06/2012 02:27 PM, Gene Wirchenko wrote:
> On Tue, 06 Mar 2012 06:40:49 -0500, Norman Peelman
> <npeelmandog@cfl.rr.com>  wrote:
>
> [snip]
>
>> how it's supposed to work. You should AVOID reusing the same id in HTML,
>> it's not illegal but it is rather pointless.
>
>       It is illegal.  As Evertjan has pointed out, HTML 4.01 standard:
> "7.5.2 Element identifiers: the id and class attributes
>
>     Attribute definitions
>
>     id = name [CS]
>            This attribute assigns a name to an element. This name must
> be
>            unique in a document."
>
>       Since I want my code to be legal, I was trying to resolve the
> conflict.
>
> Sincerely,
>
> Gene Wirchenko
>
>

   I simply meant that there's nothing stopping you from doing it, but 
it is rather pointless. Yes you can refer more than one HTML element to 
the same 'class' identifier but 'id' identifiers really should be unique.



-- 
Norman
Registered Linux user #461062
AMD64X2 6400+ Ubuntu 10.04 64bit

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

CSS Use of ID Gene Wirchenko <genew@ocis.net> - 2012-03-05 22:15 -0800
  Re: CSS Use of ID "Evertjan." <exjxw.hannivoort@interxnl.net> - 2012-03-06 10:04 +0000
    Re: CSS Use of ID "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2012-03-06 12:37 +0200
      Re: CSS Use of ID Scott Sauyet <scott.sauyet@gmail.com> - 2012-03-06 04:24 -0800
        Re: CSS Use of ID "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2012-03-06 15:21 +0200
      Re: CSS Use of ID David Mark <dmark.cinsoft@gmail.com> - 2012-03-12 17:09 -0700
  Re: CSS Use of ID Norman Peelman <npeelmandog@cfl.rr.com> - 2012-03-06 06:40 -0500
    Re: CSS Use of ID Gene Wirchenko <genew@ocis.net> - 2012-03-06 11:27 -0800
      Re: CSS Use of ID Denis McMahon <denismfmcmahon@gmail.com> - 2012-03-07 01:49 +0000
      Re: CSS Use of ID Norman Peelman <npeelmandog@cfl.rr.com> - 2012-03-06 23:13 -0500
        Re: CSS Use of ID Gene Wirchenko <genew@ocis.net> - 2012-03-06 22:32 -0800
  Re: CSS Use of ID Scott Sauyet <scott.sauyet@gmail.com> - 2012-03-06 04:36 -0800
    Re: CSS Use of ID Gene Wirchenko <genew@ocis.net> - 2012-03-06 11:29 -0800
  Re: CSS Use of ID Ross McKay <au.org.zeta.at.rosko@invalid.invalid> - 2012-03-07 11:58 +1100

csiph-web