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

Re: IDs *not* in selectors

From: L. David Baron <dbaron@fas.harvard.edu>
Date: Thu, 8 Jul 1999 13:32:37 -0400 (EDT)
Message-Id: <199907081732.NAA14189@ice1.fas.harvard.edu>
To: sue@css.nu, www-style@w3.org
On Thu, 08 Jul 1999 16:14:33 GMT, sue@css.nu (Sue Sims) wrote:
> 
> So we may infer that #123myid is perfectly legal whilst P#123myid is
> not?  If that was the intent, may I request a synthesis of the
> rationale?

Both are perfectly legal CSS, as Peter explained.  However, such
selectors cannot match anything in a legal HTML document, since ID
attributes in HTML must begin with a letter [1].  However, since HTML
does not define error-handling rules, I think it's really up to the
user-agent whether to allow this or not.

David

[1] http://www.w3.org/TR/REC-html40/struct/global.html#h-7.5.2
    http://www.w3.org/TR/REC-html40/types.html#type-name
Received on Thursday, 8 July 1999 13:32:40 GMT

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