Skip to content
Related Articles
Get the best out of our app
GeeksforGeeks App
Open App

Related Articles

How to specify the value to be sent to a server ?

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

In this article, we will see how to specify the value of an option so that this value is sent to the server.

The value attribute can be used for this purpose. It specifies the value to be sent to a server in the <option> element. The content between the opening and closing tags of <option> will be displayed by the browser in the drop-down list. However, the value that was defined in the value attribute is what will be sent to the server when the form is submitted.


<option value="value">



  <h1 style="color: green">
    Select an option to see its 
    value being sent to the server
  <form action="form.php">
    <label for="Subject">
    <select id="subject" name="subject">
      <option value="phy">
      <option value="chem">
      <option value="bio">
      <option value="math">
    <input type="submit" value="Submit">


My Personal Notes arrow_drop_up
Last Updated : 26 Mar, 2021
Like Article
Save Article
Similar Reads
Related Tutorials