W3C home > Mailing lists > Public > www-html@w3.org > April 2003

Re: The ID Attribute

From: Simon Jessey <simon@jessey.net>
Date: Sat, 5 Apr 2003 21:38:18 -0500
Message-ID: <000a01c2fbe5$954dc660$6401a8c0@Simon2S0JP11>
To: "Arthur Wiebe" <webmaster@awiebe.com>, "www-html" <www-html@w3.org>

----- Original Message -----
From: "Arthur Wiebe" <webmaster@awiebe.com>
Subject: The ID Attribute

> I wanted to use the id attribute to make anchors for a FAQ using numbers
> like 01, 02, etc. But if the value of id is numbers only, it isn't valid.
> Here's an example:
> <span id="01">Question 1</span> This is invalid while <span
> id="question01">Question 1</span> is valid.
> Why is it invalid just because the value is numbers only?

I think it has always been that way. The same goes for the name attribute.
You can see the reference to both in the HTML 4 specification:-

I encountered the problem when I redesigned my weblog around an unordered
list. I ended up giving each anchor the prefix of 'e', so I'd get anchors
like e01a, e01b, e02a and so on. In your particular situation, you could
markup the anchors with q01, q02, q03 and so on.

Simon Jessey

w: http://jessey.net/blog/
e: simon@jessey.net
Received on Saturday, 5 April 2003 21:38:19 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:06:03 UTC