Select Form

SELECT creates a menu, fill out the type of "choice of one item of many" or "Select multiple items from the many." Must be inside FORM element and have at the start or end tags. It contains several elements OPTION, otherwise it makes no sense.

MULTIPLE - offers a choice of several menu items while keeping Ctrl key pressed. By default you can choose only one menu item.

NAME - defines the name of the menu unique for current form that will be used for sending data to server. Each selected menu item when sending to the server will take on form: name / value. Value is formed by OPTION element.

SIZE - determines the number of visible items in the menu. If the value of this attribute is greater than one, the result will be a list of items.

OPTION is used only with SELECT element. OPTION element describes the individual menu items. There is no ending tag for this element.

  • SELECTED - specifies the menu item that will be initially selected when loading the document. If the menu type is "one of many", only one menu item can be marked by SELECTED flag.
  • VALUE - specifies the current item value that will be used along with other information about the contents of the filled forms. When sending information to the server, this value will be merged with the value of NAME attribute in the SELECT element.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<HTML> <body> 
<form method='post' action='all.php'> 
     Color Scheme: <br> 
    <SELECT NAME="color"> 
      <OPTION VALUE="Standard" SELECTED> </ OPTION> 
      <OPTION VALUE='Brick'> Brick </ OPTION> 
      <OPTION VALUE='Gray Mouse'> Gray Mouse </ OPTION> 
      <OPTION VALUE='Ship Bottom'> Ship Bottom </ OPTION> 
      <OPTION VALUE='Black Night'> Black Night </ OPTION> 
      <OPTION VALUE='White Light'> White Light </ OPTION> 
      <OPTION VALUE='Yellow List'> Yellow List </ OPTION> 
      <OPTION VALUE='Pink Myth'> Pink Myth </ OPTION> 
      <OPTION VALUE='Green USD'> Green USD </ OPTION> 
      <OPTION VALUE='Standard'> Standard </ OPTION> 
    </ SELECT> 
<input type='submit' name='submit' value='go'> 
</ form> 
</ body> </ HTML>
Inserting javascript
Tables in HTML
HTML forms
HTML Summary