W3C home > Mailing lists > Public > www-style@w3.org > July 1999

Re: IDs *not* in selectors

From: Peter Linss <peterl@netscape.com>
Date: Thu, 08 Jul 1999 10:10:20 -0700
Message-ID: <3784DB7B.F7140690@netscape.com>
To: Sue Sims <sue@css.nu>
CC: www-style@w3.org
Sue Sims wrote:

> From: http://www.w3.org/TR/REC-CSS2/syndata.html#q4
> "In CSS2, identifiers (including element names, classes, and IDs in
> selectors) can contain only the characters [A-Za-z0-9] and  ISO 10646
> characters 161 and higher, plus the hyphen (-); they cannot start with a
> hyphen or a digit...."
> So we may infer that #123myid is perfectly legal whilst P#123myid is
> not?

No, if you look at appendix D, '#123myid' is a single HASH token, which is
defined as a '#' followed immediately by a NAME token, which can start with

The restriction to not start with digits or '-' is limited only to IDENT
tokens (And you can always escape them (or anything for that matter) into
the start of one of those).

The text in section 4.1.3 needs clarification.


> If that was the intent, may I request a synthesis of the
> rationale?
> --
> Sue Sims

Received on Thursday, 8 July 1999 13:11:04 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:26:50 UTC