action
attribute specifies the URL of an action to
perform, usually a program on the server which processes the form.method
attribute specifies a method of data
exchange with the client and the server program, either get
or
post
.<form action="mailto:gvogl@umu.ac.ug" method="post">
body of form </form>
option
tag to define each list item.name
: the value to be returned if this item is
selected.size
attribute to list the number of items in
a scrollable menu; otherwise the menu will be pull-down.multiple
attribute (with no value) for a scroll
box allowing multiple selections (using Shift-click and/or Ctrl-click).Menu Type | Example Field | Example HTML Code |
---|---|---|
pull-down menu | Select a colour: | Select a colour:
<select><option name="red">red <option name="green">green <option
name="blue">blue </select> |
scroll box | Select a university: | Select a university:
<select size="2"><option name="MUK">Makerere <option
name="KIU">Kampala International <option name="UMU">Uganda
Martyrs </select> |
multiple selection | Select zero or more: | Select zero or more:
<select multiple size="3"><option name="matooke">matooke <option name="rice">rice <option
name="sweet potato">sweet potato </select> |
textarea
is a rectangular area where users can type
multiple lines of text. Attributes include:name
: a variable name to store the text in the text
arearows
and cols
: number of lines
and characters per linewrap
(with no value): the text wraps to fit the box
size