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

What is a QR Code And How to Create One

QR codes have evolved from a niche tracking technology to an indispensable digital connector, seamlessly…

1 week ago

Will AI Replace Software Developers?

Artificial Intelligence (AI) has made remarkable progress in recent years, transforming industries such as healthcare,…

2 weeks ago

Can Tech Really Solve Climate Change—Or Is It Just Greenwashing?

Climate change is one of the most pressing challenges of our time, with rising global…

3 weeks ago

The Inevitable Rise of Transhumanism

In the last few decades, technology has become so embedded in our daily lives that…

3 weeks ago

Drones 101: What They Are & How They Work

In recent years, drones have become more than just cool gadgets or tools for tech…

4 weeks ago

React Native vs. Flutter: Which is Best to Build Mobile Apps in Abuja?

Looking to build mobile apps in Abuja? Choosing the right framework is crucial for performance,…

1 month ago