w3-video.com logo

HTML5 Tutorial

Home HTML5 XAMPP .htaccess Firefox Notepad++

Share it



select size attribute

The size attribute on the select element:


Note: select control displays:

Examples

<selectattribute="value(s)">...<⁄select>example
7.size=number<select size="3"> ... <⁄select>

Video demonstration select size attribute

HTML5 select size attribute Tutorial

min video details
00:00 video tutorial: size attribute on select element
00:05 size attribute allows you to specify the number of options to be shown to the user from the drop-down list of options, starting with the first option
00:14 the select control displays:
- the first option by default
- the first 4 options if multiple attribute is present
- the first x options if size attribute is present, where x represents the value of the size attribute (a positive integer greater than 0)
00:29 the first 4 options are displayed (shown) in the drop-down list (to see the rest of the options, use the vertical scrollbar)
00:37 size="3" → the first 3 options will be shown to the user from the drop-down list
00:44 size="9" → the first 9 options will be shown to the user from the drop-down list
select intro select browser display select parents - children select Placeholder Label Optionselect Constraintsselect Exampleselect syntaxselect autofocus attributeselect disabled attributeselect multiple attributeselect required attribute