Skip to content
techsnow

HTML Forms

Buttons

The <button> element creates a clickable button. Its type decides what it does.

TypeWhat it does
submitSubmits the form (the default inside a form).
resetClears all inputs back to their starting values.
buttonDoes nothing by itself. Use it with JavaScript.
<form>
  <input name="name" placeholder="Name">
  <button type="submit">Send</button>
  <button type="reset">Clear</button>
  <button type="button" onclick="alert('Hi!')">Say hi</button>
</form>