Untitled Document



 Introduction to HTML
 Structure of HTML
 Creating First HTML  Document
 Building Your HTML  Document
 Tables
 Frames
 Including Images into  Document
 Including Multimedia
 Developing HTML  FORMS
 Anatomy of a FORM
 Developing HTML  FORMS
 Anatomy of a FORM
 Simple Form Layout
 
 Simple Form Layout
 The INPUT elements
 
   The INPUT elements
   The Button Value
   The Reset Value
   The Submit Value
   The Image Value
   The Checkbox Value
   The Radio Value
   The Hidden Value
   The Text Value
   The Password Value
   Other Attributes
 The INPUT Tags
 The BUTTON Element
 
 The BUTTON Element
 The SELECT and OPTION  Elements
 
 The SELECT and  OPTION Elements
 The TEXTAREA Element
 
 The TEXTAREA  Element
 The LABEL Element
 
 The LABEL Element
 The FIELDSET and  LEGEND Elements
 
 The FIELDSET and  LEGEND Elements
 Tab Navigation
 
 Tab Navigation
 Access Keys
 
 Access Keys
 Using Style Sheet
 Understanding URLs
 Using JavaScript
 Using Java

Copyrights : Layout Galaxy All Rights Reserved
No part of this tutorial may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, electrostatic, magnetic tape, mechanical or otherwise, without prior permission in writing from Layout Galaxy.




  Developing HTML Forms > The SELECT and OPTION Elements

  The SELECT and OPTION Elements

The SELECT element is used to create a list of choices either as a drop down menu or as a list box. Each of the choices in the list is an OPTION element. Adding one or more OPTION elements within the select element creates a selection list. Users can select only a single choice from a drop down menu, but you can use the multiple attribute to enable them to select a range of choices.

Syntax:

<SELECT [name=controlname] [size=controlwidth] [multiple] [disabled] [tabindex=tabnum] [onfocus=script] [onblur=script] [onchange=script] [core] [international] [events]> OPTION elements</SELECT>
<OPTION [selected] [Disabled] [value=controlvalue] [core] [international] [events] >text label or value </OPTION>

Example:

<SELECT name= "delivery speed">
<OPTION>super fast, the kids are revolting</OPTION>
<OPTION> Fast, I just woke up and I am starving</OPTION>
<OPTION>Just make sure it's warm when it gets here </OPTION>
</SELECT>

In this exercise you will learn to create a Drop-Down Menu in the FORM using the SELECT and OPTION elements.

The SELECT statement displays a drop-down menu in which only the first value is displayed. The values for selection are specified using the option statement.

The drop-down menu appears. Click the drop-down arrow to view the menu.

Back Next


Copyrights : Layout Galaxy All Rights Reserved
No part of this tutorial may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, electrostatic, magnetic tape, mechanical or otherwise, without prior permission in writing from Layout Galaxy.




17, Vadsarvala Nivas, 65-A, J. Nehru Road, Mulund (W), Mumbai - 400 080 INDIA
Tel : 91-22-25795588, 91-22-25780444 Fax : 91-22-25793397
Email : ionline@vsnl.com
© Image Online 2001-2003