Articles → HTML → Select element in HTML

Select element in HTML






Purpose





Syntax


<select>
   <option>option 1</option>
   <option>option 2</option>
   <option>option 3</option>
   ..
   ..
   ..
   <option>option n</option>
</select>





Example


<html>
<head>
    <title>select Demo</title>
</head>
<body>
    <form>
        Fruits:
        <select>
            <option>Banana</option>
            <option>Apple</option>
            <option>Orange</option>
        </select>
    </form>
</body>
</html>



Output



Click to Enlarge



Browser support


Internet ExplorerFirefoxChromeSafariOperaEdge
YesYesYesYesYesYes



Posted By  -  Karan Gupta
 
Posted On  -  Sunday, November 06, 2016
 
Updated On  -  Sunday, December 03, 2017

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250