Re: On id and name attributes

* Clover Andrew wrote:
>Bjoern Hoehrmann <derhoermi@gmx.net> wrote:
>
>> HTML 4.01 section 12.2.3 states: "The id and name attributes
>> share the same name space". Is this true for _all_ name
>> attributes?
>
>No. Each form has its own namespace for control names, and each
>applet has its own scope for parameters.

Ok, Erratum #1.

>>The same section states further:
>>
>>  "It is permissible to use both [id and name] attributes to specify an
>>   element's unique identifier for the following elements: A, APPLET,
>>   FORM, FRAME, IFRAME, IMG, and MAP".

And even further:

    "When both attributes are used on a single element, their values
     must be identical."

>> Why does this not apply to BUTTON, TEXTAREA, SELECT, INPUT,
>> OBJECT and PARAM?

Erratum #2, if the name and id attributes for those elements don't share
the same namespace, is so no reason why one must not use both
attributes. If one uses both attributes, it doesn't matter if they have
the same value or not.

>> Why 'id = name'? It is defined as ID in the DTD
>
>True! Is this a mistake?

I think so, Erratum #3.

x'posted to www-html-editor@w3.org.
-- 
Björn Höhrmann { mailto:bjoern@hoehrmann.de } http://www.bjoernsworld.de
am Badedeich 7 } Telefon: +49(0)4667/981028 { http://bjoern.hoehrmann.de
25899 Dagebüll { PGP Pub. KeyID: 0xA4357E78 } http://www.learn.to/quote/

Received on Monday, 16 July 2001 08:55:54 UTC