HTML CSS examples for HTML Tag:option
The value attribute sets the value to be sent to a server when a form is submitted.
Value | Description |
---|---|
value | The value to be sent to the server |
The following code shows how to create A drop-down list inside an HTML form:
<!DOCTYPE html> <html> <body> <form action="/action_page.php"> <select name="cars"> <option value="v">V</option> <option value="s">S</option> <option value="m">M</option> <option value="a">A</option> </select><!-- www.j a v a2s .c o m--> <input type="submit" value="Submit"> </form> </body> </html>