New! My 44-page ebook "CSS in 44 minutes" is out! 😃
# select
Defines a select dropdown with different <option>
elements.
Example: Copy
name
Defines the unique identifier for that select within the form.
Required.
"countries"
The name value must be unique within the context of a <form>
container.
It can only contain alphanumeric characters a-z
A-Z
0-9
and some special characters like -
_
… but no space.
size
When multiple
is present too, defines the height of the select list
"12"
You can use any integer.
multiple
Allows to select multiple options at once.
No value required.
autofocus
Sets focus on the select when the web page loads.
No value required.
disabled
Disables the button.
No value required.
required
Tells the browser that this select is required. Leaving it empty will show a warning.
No value required.