Re: ID

On Wed, 24 Sep 1997, MegaZone wrote:

> Simple question - are spaces allowed in 'id'?
> 
> ie. <P id="First Paragraph">
> 
> Now, after reading the spec I think no.  As 'axes' is a space seperated
> list of 'id' values, a space in an id attribute would not be acceptable.
> 
> I'm editing a book and the author used an example like that.  I changed
> it to being hyphenated, but I want to make sure I did the right thing.

IDs are sgml name values and as such can contain 0-9 A-Z - and .
There has been a lot of discussion on case sensitivity. In general
case folding is tricky for Unicode. For IDs this isn't a problem
and SGML defines these as case insensitive. The HTML working group
advocates that you use IDs case sensitively though for consistency
with the name attribute on anchors.

Regards,

-- Dave Raggett <dsr@w3.org> http://www.w3.org/People/Raggett
phone: +44 122 578 2521 (office) +44 385 320 444 (gsm mobile)
World Wide Web Consortium (on assignment from HP Labs)

Received on Wednesday, 24 September 1997 15:15:57 UTC