Expand description
Attribute names for button (<button>) elements.
§Purpose
The <button> element represents a clickable button that can submit forms,
reset forms, or trigger custom JavaScript actions.
§Common Attributes
type: Button behavior (submit, reset, button)name: Form control name for submissionvalue: Value submitted with formdisabled: Disables the buttonform: Associates button with a form by ID
§Example
<button type="submit" name="action" value="save">Save</button>
<button type="reset">Reset Form</button>
<button type="button" onclick="handleClick()">Click Me</button>
<button type="submit" formaction="/alt" formmethod="post">Alternative Submit</button>§WHATWG Specification
Constants§
- AUTOFOCUS
- The
autofocusattribute. - DISABLED
- The
disabledattribute. - FORM
- The
formattribute. - FORMACTION
- The
formactionattribute. - FORMENCTYPE
- The
formenctypeattribute. - FORMMETHOD
- The
formmethodattribute. - FORMNOVALIDATE
- The
formnovalidateattribute. - FORMTARGET
- The
formtargetattribute. - NAME
- The
nameattribute. - TYPE
- The
typeattribute. - VALUE
- The
valueattribute.