Horje

How to add HTML <select> multiple Attribute with label Tag

A drop-down list that allows multiple selections.

Definition and Usage

The multiple attribute is a boolean attribute.

When present, it specifies that multiple options can be selected at once.

Selecting multiple options vary in different operating systems and browsers:

Because of the different ways of doing this, and because you have to inform the user that multiple selection is available, it is more user-friendly to use checkboxes instead.


Browser Support

Syntax

<select multiple>

index.html
Example: HTML
<label for="cars">Choose a car:</label>

<select name="cars" id="cars" multiple>
  <option value="volvo">Volvo</option>
  <option value="saab">Saab</option>
  <option value="opel">Opel</option>
  <option value="audi">Audi</option>
</select> 

Output should be:

How to add HTML <select> multiple Attribute with label Tag




Type:
html
Category:
Web Tutorial
Sub Category:
HTML Tag
Uploaded by:
Admin