You are here: Reference > HTML > attributes > size (keygen, select)

size attribute (keygen, select)

Browser support:
Specifies the count of the visible option items in a selection list. The selection list can be a select element or the selection list of a keygen element.
If the value of the size attribute is greater than one, the appearance of the selection list is a list box.
JavaScript page for this attribute: size. You can find other example(s) there.

Possible values:

Integer that sets the count of the visible options.
Default: this attribute has no default value.

Example HTML code 1:

This example illustrates the use of the size attribute:
Three rows are visible from the drop-down list:
<br /><br />
<select size="3">
    <option />Apple
    <option />Pear
    <option selected="selected" />Peach
    <option />Cherry
    <option />Melon
    <option />Apricot
Did you find this example helpful? yes no

Supported by tags:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content