softare development

Multiple Select Dropdown in HTML

The multiple select dropdown specifies that multiple options can be selected at once.

The <select> tag in HTML allows users to select one or more options from a list of predefined options. To allow for multiple selections, you can add the multiple attribute to the <select> tag.

This is done by add the attribute multiple in the select tag.

The multiple attribute is a boolean attribute.

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

Select Dropdown Example

<form>
  <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>
</form>
multiple select dropdown

One major drawback of using this method is due to the different ways of doing this on both Windows and iOS, and because you have to inform the user that multiple selection is available, it is advisable to use checkboxes instead.

Download our mobile and learn HTML, CSS, Javascript, React, etc

Start learning how to code

Recent Posts

npm vs. Yarn: Which Package Manager Should You Use in 2025?

When starting a JavaScript project, one of the first decisions you’ll face is: Should I…

3 hours ago

Why Learn Software Development? (And Where to Start)

Software development is one of the most valuable skills you can learn. From building websites…

4 days ago

JavaScript Multidimensional Arrays

In JavaScript, arrays are used to store multiple values in a single variable. While JavaScript…

1 week ago

What is Containerization

Containerization is a lightweight form of virtualization that packages an application and its dependencies into…

2 weeks ago

Microsoft to Replace Remote Desktop App By May 27, 2025

Microsoft is discontinuing support for its Remote Desktop app on Windows, effective May 27th. Users…

3 weeks ago

Common Pitfalls in React Native Development

Now that React Native is your go-to framework for building cross-platform mobile applications efficiently, it's…

3 weeks ago