HTML tag Example The following code marks a button: Click me! Try it » Browser support All major browsers support tag. Tag Definition and Usage Notes The tag defines a button. in Inside the element, you can place content such as text or images. This is the difference between this element and a button created with the element. **Tip:** Always specify a type attribute for the element. Different browsers use different default values for the element's type attribute. Tips and Notes **Note:** If the element is used in an HTML form, different browsers may submit different button values. Use to create a button in an HTML form. Differences between HTML 4.01 and HTML5 New attributes in HTML5: autofocus, form, formaction, formenctype, formmethod, formnovalidate, and formtarget. property New : New attributes in HTML5. property Value Description autofocusNew autofocus Specifies that the button should automatically get focus when the page loads. disabled disabled Specifies that the button should be disabled. formNew form_id Specifies that the button belongs to one or more forms. formactionNew URL Specifies where to send the form data when the form is submitted. Overrides the action attribute of the form element. This attribute is used with type="submit". formenctypeNew application/x-www-form-urlencoded multipart/form-data text/plain | Specifies在向服务器发送表单数据之前如何对其进行编码。覆盖 form 元素的 enctype 属性。该属性与 type="submit" 配合使用。 | | formmethodNew | get post | Specifies the HTTP method used to send the form data. Overrides the method attribute of the form element. This attribute is used with type="submit". | | formnovalidateNew | formnovalidate | If this attribute is used, the form is not validated when submitted. Overrides the novalidate attribute of the form element. This attribute is used with type="submit". | | formtargetNew | _blank _self _parent _top framename | Specifies where to open the action URL. Overrides the target attribute of the form element. This attribute is used with type="submit". | | name | name | Specifies the name of the button. | | type | button reset submit | Specifies the type of the button. | | value | text | Specifies the initial value of the button. It can be modified by a script. | Global Attributes The tag supports HTML Global Attributes. Event attribute The tag supports HTML Event Attributes. Related Articles HTML DOM Reference Manual: Button Object