Creates a drop-down list or list box element.
To add items to the select element, use the option tag.
The select tag allows simple or multiple selection, depending on the state of the MULTIPLE attribute.
- If multiple selection is allowed, the visual appearance of the select tag can only be a list box.
- If only one selected element is allowed, the select element may be a drop-down list or a list box. The default appearance is the drop-down list in that case.
The select element is one of the form controls.
The selected state of the control can be submitted to a server if the following conditions are met:
- A form element must contain the select element.
- The action attribute of the container form must be set to the URL of the server.
- The name attribute of the select element must be specified and non-empty. If multiple selection is allowed, use brackets  at the end of the value to reach all of the selected elements on the server side.
- If multiple selection is allowed:
- If only one selected element is allowed:
If you want to see the HTML tags by categories, please visit this page.
This element requires a closing tag.
Example HTML code 1:
This example illustrates the use of the select element for a single-selection drop-down list:
Example HTML code 2:
This example illustrates the use of the select element for a single-selection list box:
Example HTML code 3:
This example illustrates the use of the select element for a multiple-selection list:
User Contributed Comments