SiteExperts.com Logo Home | Community | Developer's Paradise
User Groups | Site Tools | Site Information | Search
 Main Menu
 HTML Online

HTML Tables

Form Elements
  Input Elements
  Select Elements
  TextArea Element
  Button Element
  Grouping and Labeling
  Form Element

Images and Objects

 


Sponsored Links

HTML Select Element

The <SELECT> element creates a menu or list of options to select from. There are basically two types of lists that you can create using the <SELECT> element - a combo box or a list box. A combo box is the default list and it is usually displayed as a single item that you can expand to see the list of choices. A list box is created by adding a size attribute with a value greater than 1 to the element. When this occurs, rows of choices are displayed. This type of list also allows you to have multiple selections. You can experiment with the <SELECT> element by changing the SIZE below and turning on or off the different attributes.IE4 Only When multiple select is enabled and you are viewing a list box, to select multiple items when running Windows hold down the CTRL key.

<SELECT>
  <OPTION>Item 1
  <OPTION>Item 2
  <OPTION>Item 3
  <OPTION>Item 4
</SELECT>
<SELECT SIZE=3>
  <OPTION>Item 1
  <OPTION>Item 2
  <OPTION>Item 3
  <OPTION>Item 4
</SELECT>
<SELECT MULTIPLE SIZE=3>
  <OPTION>Item 1
  <OPTION>Item 2
  <OPTION>Item 3
  <OPTION>Item 4
</SELECT>

HTML 4.0 also defines an <OPTGROUP> element that allows you to group related list items. This element is not rendered by current browsers, but their use may help help improve the accessibility of your web page. See the HTML 4.0 recommendation for more information.

Form TextArea Element...

Copyright © 1997-2008 InsideDHTML.com, LLC. All rights reserved.