Buttons Types in HTML

Buttons can be of different types in html, for example if you have a form, the submit button would be of type=’submit‘. There are also two other types which are: ‘button‘ and ‘reset‘.

The ‘button‘ type does not do anything by default but can be listened to using javascript. The ‘reset‘ type resets all form controls to their default values.

These are some examples:

<button type="button">Click Me!</button>
<button type="submit">Submit</button>
<button type="reset">Reset</button>