HTML <select> tag
Syntax
<select> - </select>
Definition and Usage
The SELECT element defines a form control for
the selection of options (drop down list) . The SELECT element is
most useful within a FORM .
Optional Attributes
Attribute
Value
Description
disabled
disabled
When set, it disables the drop-down list
multiple
multiple
When set, it specifies that multiple items can be
selected at a time
name
name
Defines a unique name for the drop-down list
size
number
Defines the number of visible items in the drop-down list
Standard Attributes
id, class, title, style, dir, lang, xml:lang, accesskey,
tabindex
For a full description, go to Standard
Attributes .
Event Attributes
onfocus, onblur, onchange
For a full description, go to Event Attributes .
Example
Source
Output
<select name=test>
<option value ="Civilisation">Civilisation</option>
<option value ="Conquest">Conquest</option>
<option value ="Anno">Anno</option>
<option value ="Lemmings">Lemmings</option>
</select>
Civilisation
Conquest
Anno
Lemmings