Skip to content
Related Articles

Related Articles

Improve Article

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

  • Last Updated : 26 Mar, 2021

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">


Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML  course.

My Personal Notes arrow_drop_up
Recommended Articles
Page :