From MDN:
type
The type of the button. Possible values are:
- submit: The button submits the form data to the server. This is the default if the attribute is not specified, or if the attribute is dynamically changed to an empty or invalid value.
- reset: The button resets all the controls to their initial values.
- button: The button has no default behavior. It can have client-side scripts associated with the element’s events, which are triggered when the events occur.
As for the difference between button and input:
-
A
buttoncan have a separate value as data, while for aninputthe data and button text are always the same:<input type="button" value="Button Text"> <!-- Form data will be "Button Text" --> <button type="button" value="Data">Button Text</button> -
A
buttoncan have HTML content (e.g. images), while aninputcan only have text. -
A
buttonmay be easier to tell apart from otherinputcontrols (like text fields) in CSS. Note backwards browser compatibility.input { } button { /* Always works */ } input[type=button] { /* Not supported in IE < 7 */ }