input multiple Attribute - HTML CSS HTML Tag

HTML CSS examples for HTML Tag:input

Description

The multiple attribute is a boolean attribute to set if user can enter more than one value in the <input> element.

The multiple attribute works with the following input types: email, and file.

For <input type="file">: to select multiple files, hold down the CTRL or SHIFT key while selecting.

For <input type="email">: separate each email with a comma, like: mail@example.com, mail2@example.com, mail3@example.com in the email field.

In XHTML, the multiple attribute must be defined as <input multiple="multiple" />.

A file upload field that accepts multiple values:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<form action="/action_page.php">
  Select images: <input type="file" name="img" multiple>
  <input type="submit">
</form><!--from   w  ww  . jav a2s .  co  m-->

<p>Try selecting more than one file when browsing for files.</p>

</body>
</html>

Related Tutorials