HTML value attribute

value attribute defines the initial value in the input field, user visible name of the button, customized list item markers, and the values of options for the puprpose of user interface.

<form action="files/value.php" method="post">
<input type="text" name="fullname"value="name">
<input type="submit" name="submit" value="send">

Attribute values

All possible values of value attribute

The value of value attribute is plain text or valid floating point number.

Related Tags

The tags that support value attribute

<input> tag

It defines an input field that allows the user to enter data. value attribute specifies the initial value in the input control. The user can interact with value and modify the value. The current value is submitted with the form.

<option> tag

option tag defines an option. This value is sent with the form.

<option value="">
<option value="[email protected]">Chips
<option value="[email protected]">Chad

<data> tag

value attribute defines the machine-readable value of the content.

<data value="LP122">Laptop Model</data>

<li> tag

li tag defines list item. value attribute gives a customized value to the list item markers.

<li value="50">Chair</li>
<li value="51">Table</li>
<li value="52">TV</li>
<li value="53">Laptop</li>

<meter> tag

value defines the current value of the bar in the meter element.

<meter min="0" max="150" value="75"></meter>

<progress> tag

It also gives current value to the progress bar.

<progress value="250" max="300"></progress>

Was this article helpful?