Tip: Use this tag in the form element to accept user input.
Example
Source
Output
<select>
<option value ="volvo">Volvo</option>
<option value ="saab">Saab</option>
<option value ="opel">Opel</option>
<option value ="audi">Audi</option>
</select>
Optional Attributes
DTD indicates in which DTD the attribute is
allowed. S=Strict, T=Transitional, and F=Frameset.
Attribute
Value
Description
DTD
disabled
disabled
When set, it disables the drop-down list
STF
multiple
multiple
When set, it specifies that multiple items can be selected at a time
STF
name
unique_name
Defines a unique name for the drop-down list
STF
size
number
Defines the number of visible items in the drop-down list
Simple drop down box
How to create a simple drop-down box on an HTML page. A drop-down box is a
selectable list.
Another drop down box
How to create a simple drop-down box with a pre-selected value.
Reliable, affordable, feature-rich web hosting!
Take the uncertainty out of Web hosting and let GoDaddy.com
put service, performance and value back in. No matter which
hosting type or plan you choose, your site receives 24/7
maintenance and protection in our world-class data center. Plus,
you get the expert, friendly service you deserve, from the
world's largest hostname provider.
With three plans to choose from and prices starting at
just $3.99, GoDaddy.com is sure to have a plan that's
right-sized and right-priced just for you!
All plans feature FREE 24x7 setup, FREE 24x7 monitoring, best-of-breed routers, firewalls and servers, 24x7 onsite physical security
and access to our exclusive Metropolis Hosting Community.
Save 10% on web hosting - Enter code HTML at checkout.
Visit GoDaddy.com
W3Schools provides material for training only. We do not warrant the correctness of its contents.
The risk from using it lies entirely with the user.
While using this site, you agree to have read and accepted our
terms of use and
privacy policy.