W3C home > Mailing lists > Public > www-style@w3.org > October 1996

Re: IDs vs. Classes

From: Paul Prescod <papresco@calum.csclub.uwaterloo.ca>
Date: Mon, 07 Oct 1996 17:41:18 -0400
Message-Id: <1.5.4.32.19961007214118.00974884@csclub.uwaterloo.ca>
To: "Galarneau, Neil" <ngalarneau@concord6.powersoft.com>, "'www-style'" <www-style@w3.org>
At 04:50 PM 10/7/96 PDT, Galarneau, Neil wrote:
>IDs and Classes seem almost identical to me.
>
>In fact, it seems that IDs are just Classes that can only be used in the
>body once.
>
>Is that true?

You could think of it that way. But if one can be used many times and the
other only once, I wouldn't say that they are almost identical. =) Classes
are internal names for "classes" or "types" of elements. An ID is a name for
a particular element.

If you think about it in a certain way, classes actually have more in common
with element names (i.e. P, H1, DL) than with IDs in that they describe a
certain kind of data, whereas IDs name a particular data element.

 Paul Prescod
Received on Monday, 7 October 1996 18:00:48 GMT

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