Sometimes referred to as a pick list, a list box is a list of options contained in a form, pop-up window, or dialog box.
Depending on the settings, a list box can be set to allow the user to select only one of the available options or multiple options.
If supported, you can hold down the Ctrl key to select multiple options in a list box.
Example of an HTML list box
The following HTML code is the code used for the above example. This code could be placed into any HTML form to get input from visitors.
<select name="example" size="5"> <option>test text 1</option> <option>test text 2</option> <option>test text 3</option> <option>test text 4</option> <option>test text 5</option> </select>
Example of HTML list box with multiple select
Adding the "multiple" attribute to the select tag enables the ability for the user to select multiple options. Below you can select multiple options in the list box by holding down the Ctrl key and clicking each of the options you want to select.
Alternatively, if you want to select a group of options, you can hold down the Shift key and click the last option to highlight everything between the first and last selection option. For example, if you click "test text 2" and then hold down the Shift key and click "test text 5" the options 2, 3, 4, and 5 will all be selected.