button

The button element represents a button labeled by its contents.

Attributes

<button attribute-name="attribute-value"></button>
Name Value Description
autofocus autofocus | empty Specifies that the element represents a control to which a UA is meant to give focus as soon as the document is loaded - HTML5
disabled disabled | empty Specifies that the element represents a disabled control
form IDREF Identifies a form with which to associate the element - HTML5
formaction URI Form-submission action for the element - HTML5
formenctype application/x-www-form-urlencoded | multipart/form-data | text/plain MIME type with which a UA is meant to associate this element for form submission - HTML5
formmethod get | post | put | delete HTTP method with which a UA is meant to associate this element for form submission - HTML5
formnovalidate formnovalidate | empty Specifies that the element represents a control whose value is not meant to be validated during form submission - HTML5
formtarget browsing-context name or keyword Browsing context or keyword that represents the target of the control - HTML5
name string Name part of the name/value pair associated with this element for the purposes of form submission
type submit | reset | button Specifies that its button element is a button for submitting a form, for resetting a form, or with no additional semantics
value string Specifies a value

Global

Example | autofocus

Example | disabled

Example | form

Example | formaction

Example | formenctype

Example | formmethod

Example | formnovalidate

Example | formtarget

Example | name

Example | type

Example | value

Example | CSS

External

W3C HTML 4.01 Specification

W3C HTML5

W3C HTML 5.1