HTML tag
Example
A drop-down list with three visible options:
Try it »
Browser support





All major browsers support the size property.
Definition and Usage
The size attribute specifies the number of visible options in the drop-down list.
If the value of the size attribute is greater than 1 but less than the total number of options in the list, the browser displays a scroll bar to indicate that more options can be viewed.
Differences between HTML 4.01 and HTML5
none.
Syntax
Attribute values
| Value | Description |
|---|---|
| number | The number of visible options in the drop-down list. The default value is 1. If the multiple attribute is used, the default value is 4. |
HTML