HTML multiple Attribute


Definition and Usage

The multiple attribute is a boolean attribute.

When present, it specifies that the user is allowed to enter/select more than one value.


Applies to

The multiple attribute can be used on the following elements:

Elements Attribute
<input> multiple
<select> multiple

Examples

Input Example

A file upload field that accepts multiple values:

<form action="/action_page.php">
  Select images: <input type="file" name="img" multiple>
  <input type="submit">
</form>
Try it Yourself »

Select Example

A drop-down list that allows multiple selections:

<select multiple>
  <option value="volvo">Volvo</option>
  <option value="saab">Saab</option>
  <option value="opel">Opel</option>
  <option value="audi">Audi</option>
</select>
Try it Yourself »

Browser Support

The multiple attribute has the following browser support for each element:

Element
input 6.0 10.0 3.6 5.0 11.0
select Yes Yes Yes Yes Yes

Copyright 1999-2023 by Refsnes Data. All Rights Reserved.