Default type of

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

According to , the type
attribute of the <button> tag is optional.  Is the UA at liberty to
choose any type it wishes if the attribute is omitted?  Does the
presence or lack of a DTD impact the answer?

Christopher Benson-Manica  | I *should* know what I'm talking about - if I
ataru(at)    | don't, I need to know.  Flames welcome.

Re: Default type of

Christopher Benson-Manica wrote:

Quoted text here. Click to load it

W3Schools is rather error prone, in this case they are simply missing some
information. Try the spec instead:

type = submit|button|reset [CI]
    This attribute declares the type of the button. Possible values:

        * submit: Creates a submit button. This is the default value.
        * reset: Creates a reset button.
        * button: Creates a push button.


David Dorward       < <
                     Home is where the ~/.bashrc is

Re: Default type of

On 01/07/2005 22:30, David Dorward wrote:

Quoted text here. Click to load it

[From the specification:]

Quoted text here. Click to load it

It's worth pointing out two things, both related to IE:

   1. IE incorrectly assumes 'button' for the default value.
   2. IE gets the whole mechanics of the BUTTON element wrong
      when used for form submission.



Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.

Site Timeline