HTML <option> value attribute
HTML <option> tag
Example
A drop-down list with values to be sent to a server:
<select>
<option value="volvo">Volvo XC90</option>
<option value="saab">Saab 95</option>
<option value="mercedes">Mercedes SLK</option>
<option value="audi">Audi TT</option>
</select>
|
Try it yourself!
|
Definition and Usage
The value attribute specifies the value to be sent to a server when a form is
submitted.
The content between the opening <option> and closing </option> tags is what
the browsers will display in a drop-down list. However, the value in the value
attribute is what will be sent to the server when a form is submitted.
Note: If the value attribute is not specified, the content will be
passed as a value instead.
Browser Support

The value attribute is supported in all major browsers.
Syntax
Attribute Values
Value |
Description |
value |
The value to be sent to the server |
HTML <option> tag
Learn XML with <oXygen/> XML Editor - Free Trial!
 |
|
oXygen helps you learn to define,
edit, validate and transform XML documents. Supported technologies include XML Schema,
DTD, Relax NG, XSLT, XPath, XQuery, CSS.
Understand in no time how XSLT and XQuery work by using the intuitive oXygen debugger!
Do you have any XML related questions? Get free answers from the oXygen
XML forum
and from the video
demonstrations.
Download a FREE 30-day trial today!
|
|