Defines a push button. Inside a button element you can put content,
like text or images. This is the difference between this element and buttons
created with the input element.
Example
XHTML
Output
<button>Click Me!</button>
Optional Attributes
DTD indicates in which XHTML 1.0 DTD the attribute is
allowed. S=Strict, T=Transitional, and F=Frameset.
Attribute
Value
Description
DTD
disabled
disabled
Disables the button
STF
name
button_name
Specifies a unique name for the button
STF
type
button
reset
submit
Defines the type of button
STF
value
some_value
Specifies an initial value for the button. The value can be
changed by a script
W3Schools is for training only. We do not warrant its correctness or its fitness for use.
The risk of using it remains entirely with the user. While using this site, you agree to have read and accepted our
terms of use and
privacy policy.