HTML multiple Attribute

❮ HTML Attributes

Example

<form action="action.php">
	<label for="email">Enter a emails:</label>
	<input type="email" id="email" name="emails" multiple><br><br>
	<input type="submit">
</form>

Meaning

The multiple attribute allows the selection of multiple items.

The default is single-item(1) selection. Under XHTML, this attribute must have its value set to multiple="multiple".




Standard Syntax

HTML: <element multiple>
XHTML: <element multiple="multiple">



Browser Support




Status




Applies to:

The multiple attribute can be used on the following element:

Element Attribute
<input> multiple
<select> multiple






Attribute Values

Value Description
multiple This is a boolean attribute, the presence of a boolean attribute on an element represents the true value, and the absence of the attribute represents the false value.



More Examples

<select> Example

<label for="lang">Choose your option:</label>

<select name="language" id="lang" multiple>
	<option value="HTML">HTML</option>
	<option value="CSS">CSS</option>
	<option value="JavaScript">JavaScript</option>
</select>
❮ HTML Attributes