The <button>
tag is used to create a clickable button on your webpage.
Content like text or image can be inserted within the <button>
. . . . </button>
tag. The type
attribute should be specified for a <button>
tag. Different browsers use different default type for the button element.
HTML Button tag can be used inside and outside the form-
<button>
tag supports all global attributes and some specific additional attributes.Attribute | Description |
---|---|
autofocus | It makes a button automatically get focused while the loading of the page. |
disabled | It specifies that a button is disabled. |
form | It specifies one or more forms that the button belongs to. |
formaction | It specifies where to(webpage) send the form data when form is submitted. |
formmethod | It is used to select appropriate method to send form-data. |
formenctype | It specifies how form-data should be encoded before sending it to server. |
formnovalidate | It specifies that the form data should not be validated on submission. |
formtarget | It specifies where to display the response after submitting the form. |
name | It specifies the name of the button. |
type | It specifies the type of the button like submit or reset . |
value | It specifies the value of the button. It only sends the value of button with the submit button. |
<button> |
Follow Us: