HTML <button> with value Attribute

You are Here:

HTML <button> with value Attribute

The value attribute specifies the initial value for the button.

The value of the button's value attribute is submitted as a pair with the value of the name attribute as part of the form-data.

Example

HTML Online Editor
<!DOCTYPE html> <html> <body> <h2>Choose Your Gender</h2> <form action="/gender.php" method="get"> <button name="gender" type="submit" value="Male">Male</button> <button name="gender" type="submit" value="Female">Female</button> <button name="gender" type="submit" value="Other">Other</button> </form> </body> </html>

Attribute Value

ValueExplanation
textSpecifies the initial value for the button.

Reminder

Hi Developers, we almost covered 99.5% of HTML Tutorials with examples for quick and easy learning.

We are working to cover every Single Concept in HTML.

Please do google search for:

Join Our Channel

Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.

This channel is primarily useful for Full Stack Web Developer.

Share this Page

Meet the Author