- From: John Lewis <lewi0371@mrs.umn.edu>
- Date: Wed, 1 Jan 2003 11:18:07 -0600
- To: www-style@w3.org
Shelby wrote on Wednesday, January 1, 2003 at 7:33:36 AM: > At 11:17 AM 1/1/2003 +0100, Daniel Glazman wrote: >> >>>CSS selectors allows one to select elements of markup based on >> >>>attributes which are not related to *semantics*. >> >> >> >>As an editor of the W3C Selectors Specification, I assure you, that is >> >>most definitely not the intention of CSS selectors. >> > >> > Of course it is. >> >>No, it is *not*. > Er, what is a class selector? A class selector is a type of attribute selector; it selects an element whose class attribute is equal to some value. For example, I'm writing a document now that has an element with a class of "mission" on a handful of lists. The class attribute is an element identifier (like id). HTML 4.01 says: > This attribute assigns a class name or set of class names to an > element. Any number of elements may be assigned the same class name or > names. Multiple class names must be separated by white space > characters. > > ... > > The class attribute, on the other hand, assigns one or more class > names to an element; the element may be said to belong to these > classes. A class name may be shared by several element instances. > > The class attribute has several roles in HTML: > * As a style sheet selector (when an author wishes to assign style > information to a set of elements). > * For general purpose processing by user agents. > > ... > > Almost every HTML element may be assigned identifier and class > information. > > Suppose, for example, that we are writing a document about a > programming language. The document is to include a number of > preformatted examples. We use the PRE element to format the > examples. We also assign a background color (green) to all instances > of the PRE element belonging to the class "example". You seem to think it's something else entirely; what that is I'd like to know. -- John
Received on Wednesday, 1 January 2003 12:19:09 UTC