Web4College

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.

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

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.

Example
Try it
<select>
<option value="">
<option value="chips@example.com">Chips
<option value="chad@example.com">Chad
</select>

<data> tag

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

Example
Try it
<data value="LP122">Laptop Model</data>

<li> tag

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

Example
Try it
<ol>
<li value="50">Chair</li>
<li value="51">Table</li>
<li value="52">TV</li>
<li value="53">Laptop</li>
</ol>

<meter> tag

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

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

<progress> tag

It also gives current value to the progress bar.

Example
Try it
<progress value="250" max="300"></progress>