HTML select multiple attributes
Examples
Allows multiple selections in the drop-down list:
<select multiple>
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="opel">Opel</option>
<option value="audi">Audi</option>
</select>
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="opel">Opel</option>
<option value="audi">Audi</option>
</select>
try it"
Browser Support
All major browsers support multiple attributes.
Definition and Usage
multiple attribute is a Boolean attribute.
multiple attribute specifies can select multiple options.
In different operating systems and browsers, select the difference more options:
- For windows: Hold down the Ctrl button to select multiple options
- For Mac: Hold down the command button to select multiple options
Because of these differences, and the need to inform the user can use a number of options, more user-friendly way is to use the box.
Differences between HTML 4.01 and HTML5
no.
Differences between HTML and XHTML
In XHTML, prohibit attribute minimization, multiple attributes must be defined as <select multiple = "multiple">.
grammar
<select multiple>
HTML <select> tag