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

Matt Warden mwarden at gmail.com
Thu Jan 11 08:19:04 CST 2007

On 1/11/07, Lee kowalkowski <lee.kowalkowski at googlemail.com> wrote:
> 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).
> 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.
> Of course, certain browsers may be more tolerant.

I'm pretty sure he's asking *why* this is part of the spec. After all,
there must be a reason.

I figure they're trying not to clash with programming languages which
might automatically create variables based on ID or NAME. Most
programming languages do not allow variables to begin with a number.
Now, why do programming languages not allow this? Don't know.

Matt Warden
Cleveland, OH, USA

This email proudly and graciously contributes to entropy.

More information about the thelist mailing list