The <button> element represents a clickable button, used to submit forms or anywhere in a document for accessible, standard button functionality. Use CSS to override the default look and feel.

code result
<button onclick="alert('Hi, guys')"
    type="button" >
click me!  


attribute description
id, name Name of element.
value Defines the value associated with the button’s name when it’s submitted with the form data. The name of param is name of control.

Possible values:

  • submit - submits the form data to the server like <input type="submit">. This is the default value.
  • reset - resets all the controls to their initial values, like <input type="reset">.
  • button - does nothing when pressed by default. It can have client-side scripts listen to the element's events, which are triggered when the events occur.
form Id of associated <form> element.