By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,286 Members | 2,364 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,286 IT Pros & Developers. It's quick & easy.

Default type of <button>

P: n/a
According to http://www.w3schools.com/tags/tag_button.asp, 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)cyberspace.org | don't, I need to know. Flames welcome.
Jul 24 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Christopher Benson-Manica wrote:
According to http://www.w3schools.com/tags/tag_button.asp, the type
attribute of the <button> tag is optional.


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.

-- http://www.w3.org/TR/html4/interact/...ml#edef-BUTTON

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jul 24 '05 #2

P: n/a
On 01/07/2005 22:30, David Dorward wrote:
Christopher Benson-Manica wrote:
According to [W3Schools], the type attribute of the <button> tag is
optional.

[From the specification:]
* submit: Creates a submit button. This is the default value.


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.

[snip]

Mike

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
Jul 24 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.