What is the HTML multiple attribute?

The multiple attribute in HTMLHypertext Markup Language is used to allow a user to select multiple options from a list of available options. It is a Boolean attribute.

The multiple attribute is used with the <input> and <select> elements.

Syntax


<input/select multiple>

Code

The basic HTML code to demonstrate the use of the multiple attribute is as follows:

In this example, we can see that we have made a list with several options and the user is able to select multiple options from the list.

Free Resources