HTML Chapter 7




Skip to Chapter   1  2  3  4  5  6  7  8 

                                                              Chapt 7 -- Forms






Forms

You would use a form in much the same way you would use a table(by putting the <input> tags inside the <form> and </form> tags).
To use a form you must first understand the different types of input fields.
Here is a list of the fields and their description:
<input type="text"> This is a text box:
<input type="password"> Like a text box, but does not show the letters:
<input type="button"> looks like this:
<input type="submit"> Like a button, but submits the information to a cgi script:
<input type="checkbox"> Looks like this:
<input type="radio"> Displays a radio button:
The second most important attribute is the value attribute.
Typing <input type="button" value="click me"> gives you:
The value attribute can be used with all types of input elements, try them out for yourself!

Implementing the <input> tag

For some magical reason you can't get information from a form unless you put the elements of your form in the form tag.
Here is an example form to play with:
<form name="frm">
<input type="text" name="txt" value="this is some text" size=30>
<input type="button" value="show me what I typed" onclick="javascript:alert(document.frm.txt.value);">
</form>

GO TO THE TESTBED!
You have now finished the HTML Dojo!
Tables Forms Congratulations!