The <select> element

A form control which provides a drop-down menu of items, from which the user can select one or possibly several.

Full list of attributes

All the usual HTML global attributes are available

autocomplete
Whether to use auto-completion for filling in the field.
autofocus
Tells the browser to put the focus on this element when the page has finished loading, rather than focussing on the first focusable element on the page as usual.
disabled
The control will be disabled if this is used. It will not respond to clicks, and will not play any part in generating the data submitted by the form.
form
Explicitly sets the <form> element with which this control should be associated.
multiple
If used, the browser should allow the user to select more than one option from the list.
name
The name that will be used for this control's value when it's included in the data generated when the form is submitted.
required
If present, the element should be considered invalid if none of the options has been chosen.
size
The number of options which the browser should make visible at once. Defaults to one for single selections (which will show as a drop-down menu) and four if the multiple attribute is present (showing as a list box).

Further information

The Web Design Academy Contact us

By form

By Phone

+44 (0)113 234 4611

By email

enquiries@thewebdesign.academy

By snail mail

Suite 3 15 South Parade Leeds LS1 5PQ United Kingdom