Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML option value attribute

HTML

HTML option Tag Reference HTML

Example

A drop-down list in an HTML form:

Try it »


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the value attribute.


Definition and Usage

The value attribute specifies the value sent to the server when the form is submitted.

The opening tag The content between them is what the browser displays in the drop-down list, while the value in the value attribute is what is sent to the server when the form is submitted.

**Note:** If no value attribute is specified, the option's value will be set to


Differences between HTML 4.01 and HTML5

none.


Syntax