English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The multiple attribute is a boolean attribute that specifies whether multiple values are allowed to be entered in the <input> element. The multiple attribute is applicable to the following input types: email and file.
File upload field, accepts multiple values:
<!DOCTYPE html> <html> <head> <title>HTML: <input> multiple attribute - Basic Tutorial Website(oldtoolbag.com)</title> <body> <form action="action_page.php"> Select images: <input type="file" name="img" multiple> <input type="submit"> </form> When browsing local files, you can try to select multiple files.</p> </html>Test to see ‹/›
IEFirefoxOperaChromeSafari
Internet Explorer 10Firefox, Opera, Chrome, and Safari support the multiple attribute.
Note:Internet Explorer 9 Previous versions of the software do not support the multiple attribute of the <input> tag.
The multiple attribute is a boolean attribute.
If present, it specifies that the user can enter multiple values in the<input>element.
Note: The multiple attribute applies to input types: email and file.
Tip: For<input type ="file">: To select multiple files, hold down the CTRL or SHIFT key when selecting.
Tip: For<input type ="email">: Separate each email address in the email field with a comma, for example: [email protected], [email protected], [email protected].
The multiple attribute is in HTML5 with the new attributes.
In XHTML, attribute shorthand is prohibited, the multiple attribute must be defined as <input multiple="multiple" />.
<input multiple>HTML <input> tag