Welcome to Bucaro TecHelp!

Bucaro TecHelp
Maintain Your Computer and Use it More Effectively
to Design a Web Site and Make Money on the Web

About Bucaro TecHelp About BTH User Agreement User Agreement Privacy Policy Privacy Site Map Site Map Contact Bucaro TecHelp Contact RSS News Feeds News Feeds

Victims of Sandy Hook

Stop the Slaughter of Innocents. Congress is bought and paid for by gun lunatics and gun promotion groups. If you want to live in a safe America, help buy Congress back for America. Send a donation to Mayors Against Illegal Guns, 909 Third Avenue, 15th Floor New York, NY 10022

Setting the Number of Items Visible in a Select List

An HTML Select list is a form control used to create a drop-down list of items from which the user can select. Each item in a select list is defined by an option element. The select list can appear as a drop-down list as shown below.

Or, by setting its size property it can appear as a scrolling list, displaying more than one item at a time. The select list below shows three items because its size attribute is set to 3.

<select size="3">
<option value="Bread">Bread</option>
<option value="Coffee">Coffee</option>
<option value="Pie">Pie</option>
<option value="Salad">Salad</option>
<option value="Soup">Soup</option>

If you set the size attribute to the number of items in the list, the list it will appear as an open list with no scrollbar, as shown below.

<select size="5">
<option value="Bread">Bread</option>
<option value="Coffee">Coffee</option>
<option value="Pie">Pie</option>
<option value="Salad">Salad</option>
<option value="Soup">Soup</option>

Note: When setting size to number of items in list, in Gecko-based browsers like Firefox and Chrome, the scrollbar is grayed out. In Internet Explorer the scrollbar is totally hidden.

More HTML Code:
• HTML5 Input Type - Email
• HTML Frames Basics
• HTML Select List Basics
• Text Input Box Basics
• HTML Textarea Basics
• HTML Definition List
• The HTML BODY tag
• Form Input Labels
• HTML DIV Basics
• Use HTML Target Attribute to Specify Where to Open Document

RSS Feed RSS Feed

Follow Stephen Bucaro Follow @Stephen Bucaro

Fire HD
[Site User Agreement] [Privacy Policy] [Site map] [Search This Site] [Contact Form]
Copyright©2001-2017 Bucaro TecHelp 13771 N Fountain Hills Blvd Suite 114-248 Fountain Hills, AZ 85268