ID and CLASS (fwd)

Once upon a time Volker Kroll shaped the electrons to say...
>its possibly up to me that I don't understand the difference between ID and
>CLASS. By now I think that ID is only for one occurence in a file and CLASS
>for more occurences. Is this correct, or do I misunderstand the spec.

ID - holds ONE and only one value.  And that value must be unique in the

CLASS - can hold a LIST of values, and these values can be repeated on 
other elements.

>BTW, if I specify ID more than one time in a HTML file with linked CSS it
>works as expected, every element gets the desired style, but my validator
>tells me:
>ID is already definded.

The browser is just being nice.  It is not a valid use.  And ID is actually
used more for other things, not style sheets.  Such as defining the
destination to a link, or naming an element to be manipulated by scripting.

Neither use is very tolerant to duplicate ID elements.  

Livingston Enterprises - Chair, Department of Interstitial Affairs
Phone: 800-458-9966 510-737-2100 FAX: 510-737-2110
For support requests:  <> 
Snail mail: 4464 Willow Road, Pleasanton, CA 94588

Received on Wednesday, 12 November 1997 03:52:26 UTC