The value attribute specifies the initial value of the button.
The button value can be changed by a script.
Important: Be careful when using the button element in a form. In a form
the different browsers will submit different values. Internet Explorer will
submit the text between the <button> and </button> tags, while other browsers
will send the content of the value attribute. When in a form, use the
input element instead.
Syntax
<button value="value">
Syntax Example
<button value="option1">
Attribute Values
Value
Description
value
Specifies value of the button.
Browser Support
The attribute is supported in all major browsers except Internet Explorer.If
the button is in a form, IE will treat the text between the
<button> and </button> tags as value.
W3Schools is for training only. We do not warrant the correctness of its content.
The risk from using it lies entirely with the user.
While using this site, you agree to have read and accepted our
terms of use and
privacy policy. Copyright 1999-2009 by Refsnes Data. All Rights Reserved.