elibraryportal Logo

HTML Button Tag

The <Button> Tag is used to creating a button within HTML form on your webpage.



Test it Now

Attributes of HTML Button Tag

<button> tag supports all global attributes and some specific additional attributes.

There is given a list of HTML button tag attributes.

Attribute Value Description
autofocus autofocus It specifies that a button should automatically get focus while the loading of the page.
disabled disabled It specifies that a button shuld be disabled.
form form_id It specifies one or more forms that the button belongs to.
formaction URL It is used for submit type. It specifies where to send the form data when form is submitted.
formenctype application/x-www-form-urlencoded
It specifies how form-data should be encoded before sending it to server.
formmethod get
It specifies how to send form-data.
formnovalidate formnovalidate It specifies that the form data should not be validated on submission.
formtarget _blank
It specifies that where to display the response after submitting the form.
name name It specifies the name of the button.
type button
It specifies the type of the button.
value text It specifies the value of the button.

Next TopicHTML hr tag