Tip: Use this tag in the form element (to accept user input),
elsewhere it is meaningless.
Example
XHTML
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 XHTML 1.0 DTD the attribute is
allowed. S=Strict, T=Transitional, and F=Frameset.
Attribute
Value
Description
DTD
disabled
disabled
Disables the drop-down list when it first loads
STF
multiple
true
false
Specifies whether multiple items can be selected at a time
STF
name
unique_name
Defines a unique name for the drop-down list
STF
size
number
Definer the number of visible items in the drop-down list
W3Schools is for training only. We do not warrant its correctness or its fitness for use.
The risk of using it remains entirely with the user. While using this site, you agree to have read and accepted our
terms of use and
privacy policy.