Posted by RobG on 06/27/05 06:06
Mitja wrote:
> On Sat, 25 Jun 2005 03:18:02 +0200, Jonathan N. Little
> <lws4art@centralva.net> wrote:
>
>> Caversham wrote:
>>
>>> I notice that Dreamweaver automatically adds both name and id
>>> attributes to form input tags. Are both of these required? Is there
>>> some recommendation both should be used?
>>> Caversham
>>>
>> name is for backward compatibility with legacy browsers, like NN4x.
>>
> Not for form elements. Try
> <form ...>
> <input type="text" id="foo" value="bar"> <input type="submit">
> </form>
> and see if it works :)
> ID and name have different semantics and uses, like Lachlan explained.
Input & name:
<URL:http://www.w3.org/TR/html4/interact/forms.html#adef-name-INPUT>
<URL:http://www.w3.org/TR/html4/interact/forms.html#control-name>
ID:
<URL:http://www.w3.org/TR/html4/struct/global.html#adef-id>
HTML attributes:
<URL:http://www.w3.org/TR/html4/index/attributes.html>
--
Rob
[Back to original message]
|