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

Related Articles

HTML | <select> form Attribute

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

The <select> tag is an HTML element used to create a drop-down list of options for the user to select the form option.

in this tag with the used  <option>  tags.

<select> tag contains some <option> tags 


  <option value="option1">Option 1</option>
  <option value="option2">Option 2</option>
  <option value="option3">Option 3</option>
  <option value="option4">Option 4</option>


Attribute Values: 

  • value: The value attribute of the <option> tag defines the value that will be sent to the server when the form is submitted, while the text between the opening and closing <option> tags is the display text that the user will see in the drop-down list.



<!DOCTYPE html>
    <title>select Form Attribute</title>
        .title {
            text-align: center;
        fieldset {
            width: 50%;
            margin-left: 22%;
        h1 {
            color: green;
        <h2>&lt;select&gt; form Attribute</h2>
      Select your preferred course from the drop-down list:
        <select form="myGeeks" id="myCourses" autofocus>
            <option value="C++">c++</option>
            <option value="Placement">Placement</option>
            <option value="Java">Java</option>
            <option value="Python">Python</option>
        <form id="myGeeks">
            <input type="submit">



Supported Browsers: The browser supported by HTML <select>form Attribute are listed below:

  • Google Chrome
  • Edge 12 and above
  • Internet Explorer 
  • Firefox 1 and above
  • Opera
  • Safari

My Personal Notes arrow_drop_up
Last Updated : 03 May, 2023
Like Article
Save Article
Similar Reads
Related Tutorials