programming-examples/html/Basics/Enable multiple selection inside a select box.html
2019-11-18 14:44:36 +01:00

21 lines
802 B
HTML

<!DOCTYPE html>
<html subLang="en">
<head>
<title>Example of HTML select box with multiple selection</title>
</head>
<body>
<form action="">
<select multiple="multiple">
<optgroup label="Sports cars">
<option value="ferrari">Ferrari</option>
<option value="lamborghini">Lamborghini</option>
</optgroup>
<optgroup label="Luxury cars">
<option value="mercedes">Mercedes</option>
<option value="bentley">Bentley</option>
</optgroup>
</select>
</form>
<p><strong>Note:</strong> Press control or shift key on the keyboard while clicking on the other options to enable multiple selections.</p>
</body>
</html>