CodeCrunch - http://www.codecrunch.com
HTML Intermediate Tutorial: Phase 2
http://www.codecrunch.com/articles/96/1/HTML-Intermediate-Tutorial-Phase-2.html
By Daniel Phillips
Published on 07/20/2006
 
The first part of the Forms tutorial, details use of forms and types of data collection.

HTML Intermediate Tutorial: Phase 2

Welcome to the second Intermediate HTML tutorial! In this one we will be looking at forms - excited? Me too.... pfft!

Forms are useful for lots of things!, for example if you want to collect data on users, or have a complaint reporting system, you can have the results posted on a document on your server, think of it as a log.

The basic construction of the form tag is something like this.

<form> - Starts the tag

<input> -Specifies input

<input> -Specifies input

</form> - Ends the tag

The input tag is customisable, and in this tutorial will detail the ways in which this can be done!


HTML Intermediate Tutorial: Phase 2

1. For text Fields - useful for when you want a user to enter letters or numbers into a form.

To create a text field, you simply need to make an input tag look like this.

<input type="text" name="Age">

2. Radio Buttons - these handy little devices allow a user to select an option from

So say you wanted your users to tick either"male" or "female"

<input type="radio" name="sex" value="male"> Male

<br>

<input type="radio" name="sex" value="female"> Female

 

This would display something like this in a browser!

3.Check Boxes - Well they are.... check boxes, its pretty self explanatory!

<input type="checkbox" name="bike">

I have a dog

<br>

<input type="checkbox" name="cat">

I have a cat

This will simply place checkboxes with the options next to them!


HTML Intermediate Tutorial: Phase 2

Thats all for this tutorial, in the next one we will delve into the troublesome and rather complicated task of how to send and manage the results your forms collect! And also some other stuff, hope you gained something from this text, thanks!