HTML multiple Attribute
The HTML multiple attribute is a Boolean attribute that allows users to provide or select more than one value in supported <input> controls and the <select> element.
Elements That Use the multiple Attribute
The multiple attribute is used with email and file input controls and with the <select> element.
| Element | Description |
|---|---|
<input type="email"> |
Allows the user to enter more than one email address. |
<input type="file"> |
Allows the user to select more than one file. |
<select> |
Allows the user to select more than one option. |
Boolean Attribute
The multiple attribute is a Boolean attribute. Its presence enables multiple values or selections, while its absence limits the control to a single value or selection.
<input type="file" multiple>
Because multiple is Boolean, writing multiple="false" does not disable it. The attribute is still present, so multiple selection remains enabled. To disable the behavior, omit the attribute entirely.
Using multiple with File Inputs
When multiple is used with <input type="file">, the file picker allows the user to select more than one file.
<label for="photos">Choose photos:</label>
<input type="file" id="photos" name="photos" multiple>
The way multiple files are selected depends on the browser, operating system, and device. When a form containing the control is submitted, each selected file is associated with the control's name.
Using multiple with Email Inputs
When multiple is used with <input type="email">, the control can accept a comma-separated list of email addresses instead of a single address.
<label for="recipients">Email recipients:</label>
<input type="email" id="recipients" name="recipients" multiple>
Each address must satisfy the email input's validation requirements. Browsers may remove surrounding whitespace from individual addresses when processing the list.
Using multiple with <select>
On a <select> element, the multiple attribute allows more than one <option> to be selected.
<label for="browsers">Choose browsers:</label>
<select id="browsers" name="browsers" multiple size="4">
<option value="chrome">Chrome</option>
<option value="edge">Edge</option>
<option value="firefox">Firefox</option>
<option value="safari">Safari</option>
</select>
The browser typically displays a multiple-selection list instead of a single-selection drop-down. How users select several options depends on their operating system and input device, so instructions should not assume a particular keyboard or mouse combination.
Common Mistakes
Do not use multiple="false" when you want to disable multiple selection. Because multiple is a Boolean attribute, its presence enables the feature regardless of the assigned text value.
Do not expect multiple to work with every input type. On <input>, it applies to the email and file types.
When using multiple with an email input, separate addresses with commas rather than spaces or semicolons.
Do not assume every user selects multiple options in a <select> the same way. Selection behavior varies among desktop and mobile devices and according to the user's input method.
Browser Support
Baseline: Widely available indicates a feature has been supported by core browsers for at least 30 months. At this stage, the feature is considered stable and safe for most websites to use without needing to worry about compatibility issues or fallbacks, as it is supported by the vast majority of users' devices and browser versions.
The multiple attribute is widely supported for email inputs, file inputs, and multiple-selection <select> controls. File-picker behavior can vary by browser, operating system, and device.
Checking Browser Support
For current browser compatibility information, visit Can I Use? . Search for the HTML element or attribute you want to check. You can also narrow your search by entering an element name and attribute name separated by a colon. Search results can include related HTML features, element attributes, input types, APIs, and other technologies, so select the result that most closely matches the feature you are checking.
Try the multiple Attribute
The example uses multiple on a <select> element so more than one browser can be selected. Try selecting several options to see how a multiple-selection list works.
Summary
The HTML multiple attribute allows users to provide or select more than one value. It applies to <input type="email">, <input type="file">, and <select>, with the exact behavior determined by the type of form control.
