Ngôn ngữ HTML - Cho phép chọn nhiều trong thẻ select

Cho phép chọn nhiều trong thẻ select

<!DOCTYPE html>
<html lang="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> 

Xem ví dụ