{{short description|Graphical control element}} {{Refimprove|date=June 2019}} thumb|A generic list box A '''list box''' is a graphical control element that allows the user to select one or more items from a list contained within a static, multiple line text box. The user clicks inside the box on an item to select it, sometimes in combination with the {{key press|Shift}} or {{key press|Ctrl}} in order to make multiple selections. "Control-clicking" an item that has already been selected, unselects it.
A list box is called <code>'''select'''</code> or <code>'''select1'''</code> in the XForms standard. Select is used for allowing the user to select many items from a list whereas <code>'''select1'''</code> only allows the user to select a single item from a list.
==HTML== In web forms, the HTML elements {{code|lang=html|code=<select multiple>}} and {{code|lang=html|code=<option>}} are used to display a listbox: <ref>{{cite web |title=HTML <select> multiple Attribute |url=https://www.w3schools.com/tags/att_select_multiple.asp |website=W3Schools}}</ref> <syntaxhighlight lang="html"> <select multiple> <option>List item 1</option> <option>List item 2</option> <option>List item 3</option> <option>List item 4</option> <option>List item 5</option> <option>List item 6</option> </select> </syntaxhighlight>
==See also== *Drop down list - Like a list box, but not permanently expanded to show the elements of the list. *Combo box - Like a drop down list, but users also can make entries not on the list. *Scrollbar
==References== {{reflist}}
{{Graphical control elements}} Category:Graphical control elements {{GUI-stub}}