Advertisement
Home Open Editor ❯

HTML <button> value Attribute

Example

<form action="action.php" method="get">
  Click the button.
  <button name="subject" type="submit" value="HTML">HTML</button>
  <button name="subject" type="submit" value="CSS">CSS</button>
  <button name="subject" type="submit" value="JavaScript">JavaScript</button>
</form>

Try this code ❯

Meaning

The value attribute defines the value that is sent to the server when the button is clicked.

This might be useful when using multiple submit buttons that perform different actions.


Standard Syntax

<button value="value">


Advertisement

Attribute Values

Value Description
text Specifies the value of the button.
Home Open Editor ❯
Advertisement