RuskFamily.com ... the Legend Continues Practice Page
| Home | HTML Guide Start | List of HTML Elements | Next Element | Previous Element |

<SELECT></SELECT>

Contains a menu of selectable items on a form


Element used to define a list of choices for the user.

	<html>
	<head>
	<title>A Simple Form</title>
	</head>
	<body>
	   .
	   .
	<form method="POST" enctype="text/plain" action="mailto:mike@ruskfamily.com">
	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 select element has the following attributes:

name
This is the name that will be associated with the value(s) selected by the user and returned to you.
size
This tells the browser how many items to display in the menu window. If you are doing something like a list of States you might want to have the window only show 10 states at a time.
multiple
If you put this on the select element then the user is allowed to highlight more than one selection. They use the Ctrl key just like in Windows.

Netscape

Nothing extra.

Microsoft Internet Explorer

Nothing special that I know of - yet.

Internationalization

Nothing special.

| Home | HTML Guide Start | List of HTML Elements | Next Element | Previous Element |

Michael T. Rusk
Comments to author: mike@ruskfamily.com

All contents copyright © 1996-2001 Michael T. Rusk
All rights reserved.

Valid HTML 4.01!   Valid CSS!

Revised: Sunday, December 30, 2007 11:06 -0500
URL: ./htmlgd/tagselec.html