HTML and CSS Reference
In-Depth Information
EXAMPLE 11.8 ( CONTINUED )
<br />
<input type="radio" name="status"
value="senior" id="senior" />
<label for="senior">senior</label>
<br />
<input type="radio" name="status" value="adult" id="adult" />
<label for="senior">adult</label>
<br />
<input type="radio" name="status" value="child" id="child" />
<label for="senior">child</label>
<br />
<br />Choose a vacation spot:<br />
4
<select multiple name="location" />
<option selected value="hawaii"> Hawaii </option>
<option value="bali">Bali </option>
<option value="maine">Maine </option>
<option value="paris">Paris </option>
</select>
<p>
</fieldset>
5
<input type="submit" value="Submit" />
6
<input type="reset" value="Clear" />
</p>
</form>
7
</big>
</strong>
</body>
</html>
EXPLANATION
1
The form starts here. The action attribute contains the URL of the server program
that will get the form. The method being used (how the form will be sent) is the
post method. This is the most common method used with forms.
2
The user is asked to type something into a text field box.
3
The user is asked to check a box for his or her place of work.
4
The user is asked to select a vacation spot from a select menu, or drop-down list.
Because this is set to multiple, it allows more than one option to be chosen.
5
When the user clicks the Submit button, the form is sent to the URL (server pro-
gram) assigned to the action attribute of the <form> tag.
6
If the user clicks the Clear button, all fields will be reset to their defaults.
7
This tag marks the end of the form. See Figure 11.16.
Search WWH ::




Custom Search