HTML <option> value Attribute

❮ HTML <option> tag


<form action="action.php">
<label for="lang">Choose a language:</label>

<select id="lang" name="lang">
  <option value="HTML">HTML</option>
  <option value="CSS">CSS</option>
  <option value="JavaScript">JavaScript</option>

<input type="submit" value="Submit">


The value attribute specifies the value to be included with the form result when the item is selected.

The value sent when the form is submitted if the option has been selected in the dropdown list.

Note: If the value attribute is omitted, the content will be passed as a value instead.

Standard Syntax

<option value="text">text</option>

Browser Support


Attribute Values

Value Description
text Specifies the textContent of the element.
❮ HTML <option> tag