English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML Reference Manual

HTML Tag大全

HTML select multiple attribute

The multiple attribute is a boolean attribute, the multiple attribute specifies that multiple options can be selected at one time.

 HTML <select> tag

Online Example

Multiple selection dropdown list:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>HTML <select> multiple attribute usage-基础教程(oldtoolbag.com)</title>
</head>
<body>
<form action="action_page.php">
<select multiple>
  <option value="PHP">PHP</option>
  <option value="Python">Python</option>
  <option value="C#">C#</option>
  <option value="Golang">Golang</option>
</select>
</form>
</body>
</html>
Test it out ‹/›

Browser Compatibility

IEFirefoxOperaChromeSafari

All major browsers support the multiple attribute.

Definition and Usage

The multiple attribute is a boolean attribute.

The multiple attribute specifies that multiple options can be selected at once.

Selecting multiple options varies between different operating systems and browsers:

  • For Windows: Hold down the Control (ctrl) button to select multiple options

  • For Mac: Hold down the command button to select multiple options
    Using checkboxes is more user-friendly because the way this operation is performed is different, and it is necessary to notify the user that multiple selections can be made.

HTML 4.01 With HTML5Differences

None.

Differences between HTML and XHTML

In XHTML, attribute shorthand is prohibited, the multiple attribute must be defined as <select multiple="multiple">.

Syntax

<select multiple>
 HTML <select> tag