Home Menu

button

The button HTML element represents a button labeled by its contents.

Syntax

HTML

<button attribute-name="attribute-value"></button>

Attributes

Global

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
disabled disabled | empty Specifies that the element represents a disabled control
form IDREF Identifies a form with which to associate the element
formaction URI Form-submission action for the element
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
formmethod get | post | put | delete HTTP method with which a UA is meant to associate this element for form submission
formnovalidate formnovalidate | empty Specifies that the element represents a control whose value is not meant to be validated during form submission
formtarget browsing-context name or keyword Browsing context or keyword that represents the target of the control
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

Examples

autofocus

disabled

form

formaction

formenctype

formmethod

formnovalidate

formtarget

name

type

value

CSS

Web Hypertext Application Technology Working Group (WHATWG)

JesusBible
HTMLCSSJSPHPSVGMore
AboutTerms