Example Allow multiple selection in a drop-down list: <select multiple="multiple"> <option value="vo...
Example
Allow multiple selection in a drop-down list:<select multiple="multiple"> <option value="volvo">Volvo</option> <option value="saab">Saab</option> <option value="mercedes">Mercedes</option> <option value="audi">Audi</option> </select> |
Definition and Usage
The multiple attribute specifies that multiple options can be selected at the same time.Selecting multiple options vary in different operating systems and browsers:
- For windows: Hold down the control (ctrl) button to select multiple options
- For Mac: Hold down the command button to select multiple options
Tip: The multiple attribute can be used together with the size attribute to define the number of options to be displayed.
Browser Support
The multiple attribute is supported in all major browsers.Syntax
<select multiple="value"> |
Attribute Values
Value | Description |
---|---|
multiple | Specifies that multiple options can be selected |