<input> tag | Most form fields use this tag. It is a non-paired tag the
requires attributes to determine it's behavior.
The most commonly used attributes are:
|
type attribute | This is the most common attribute, and it determines the
type of field that will be displayed:
|
name attribute | This attribute is used to identify the field, and is very
useful when attempting to retrieve the value stored in the field once it
reaches the server. Make a habit of always naming your fields.
When naming radio input tags, it is a common practice to name related
radio tags the same. This is what forces one choice from several.
|
value attribute | For buttons, this attribute determines the label that
appears on the button. For text and hidden, it determines the text
stored in the field. |
<textarea> </textarea> tag |
A paired tag (closing tag required) that allows the user to
enter text in a multi-line format. The name attribute should be used
with this tag. |
<select> <select> tag |
A paired tag (closing tag required) that allows the user to
make a choice from a list. Between the tags are a list of
<option> tags that are the items appearing in the list. |
<option> </option> tag |
The text between these tags is what is displayed in the
browser.
Use the value attribute of this tag for passing the selection value to the server program. |
To see an example of all these form fields, go to the Form Fields example page. Feel free to download the page and open it in a text editor to see how it was done. You can download the page in one of two ways: