[thelist] What's the reasoning behind not starting IDs with a number?

kasimir-k kasimir.k.lists at gmail.com
Thu Jan 11 06:02:38 CST 2007

> On 11/01/07, Will Mo <willthemoor at gmail.com> wrote:
>> So then, do tell.  Just what's the matter with an ID of "12-06" (month-year
>> in this case).

Lee kowalkowski scribeva in 11/01/2007 10:01:
> If you're talking about HTML id attributes, the HTML specification
> says they must start with a letter (a-z) and only contain
> alphanumerics, hyphens, underscores, colons and periods.

Just to add relevant links to the specs:


For XML:
says "Values of type ID  MUST match the Name production." and
tells what that production is.

And while HTML letters are [A-Za-z] XML has wider range:

And XHTML is XML too, "Therefore, in XHTML 1.0 the id attribute is 
defined to be of type ID." (http://www.w3.org/TR/xhtml1/#h-4.10)


More information about the thelist mailing list