input type button - label vs value

Html

Html Problem Overview


I think that the normal behavior of a button like the one below is that the value attribute serves as a label as well:

<input type="submit" name="submitButton" value="DeleteAnswer22" />

Is it possible to have separate attributes for display label and value?

Html Solutions


Solution 1 - Html

Use the HTML Button element, with type submit, instead:

<button type="submit" name="submitButton" value="DeleteAnswer22">Delete Answer 22</button>

This will result in a submit button that sends the value DeleteAnswer22 but displays "Delete Answer 22".

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questionuser441365View Question on Stackoverflow
Solution 1 - HtmlJonathanView Answer on Stackoverflow