HTML Element: button

 

There are three types of type for a button element, thought they’re all displayed in exactly the same way by the browser:

  1. type=submit: Used to submit a form.
  2. type=reset: Used to reset a form.
  3. type=button: Used as a general button control (does nothing by default).

Example

Syntax

1
2
3
4
5

Result

Browser Support

 

Attributes

The