<OPTION></OPTION>

Defines a choice to a SELECT element


[HOME] [PAGE UP] [PREV PAGE] [NEXT PAGE]


Element used within a select portion of a form to provide a list of choices for the user.

   <html>
        <head>
        <title>A Simple Form</title>
        </head>
        <body>
           .
           .
        <form method="POST" enctype="text/plain" action="mailto:mrusk@radix.net">
        Your name please:<br>
        <input type=text name=name size=50 maxlength=50><br>
        How did you find me?:<br>
        <select name=howfound>
==>>        <option selected value="Best Friend">Best Friend
==>>        <option value="Close Friend">Close Friend
==>>        <option value="Friend">Friend
==>>        <option value="Larry King">Larry King
==>>        <option value="Grease Man">Grease Man
==>>        <option value="Told Not to Come">I was told not to visit
       </select><br>
        Comments?:<br>
        <textarea name=comment wrap=virtual rows=5 cols=55>I love this site because...</textarea>
        <br>
        <input type=submit value=Submit>
        <input type=reset value=Clear>
        </form>
           .
           .
        </body>
        </html>

So there it is! A simple guest book entry form that ends up mailing you the entry. Unless of course the viewer is using Microsoft Internet Explorer. Too bad.

If this example looks familiar it's because I'm using for all my form elements.

HTML 3.2 Final

The list of choices is fairly simple to set up:

value
What value is associated with the choice and will be passed back to you as the value of this field if it is selected. If you don't specify a value then you'll get back whatever text you put after the option element.
selected
Specify this for one of the options (or several if you're doing one of the multiple thingy's). This is known as the "default" choice if they don't do anything and just press SUBMIT.

Netscape

Nothing extra.

Microsoft Internet Explorer

Nothing special that I know of - yet.

Internationalization

Nothing special.


[HOME] [PAGE UP] [PREV PAGE] [NEXT PAGE]


The Rusk Family . . . "the Legend Continues"

Michael T. Rusk
Comments to author: mrusk@radix.net

All contents copyright © 1996, 1997 Michael T. Rusk
All rights reserved.

Revised: December 03, 1997 10:43 -0500
URL: ./htmlgd/tagoptio.html