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>

Try It


Output


Picture showing the output of Select element in HTML
Click to Enlarge



Browser Support


Internet ExplorerFirefoxChromeSafariOperaEdge
YesYesYesYesYesYes



Posted By  -  Karan Gupta
 
Posted On  -  Sunday, November 6, 2016
 
Updated On  -  Sunday, December 3, 2017

Query/Feedback


Your Email Id
 
Subject
 
Query/FeedbackCharacters remaining 250