HTML form element – Check box

Posted by Shek on May 29, 2008 under HTML | Be the First to Comment | Total View: 326 views

In HTML form, sometimes you might like to let your user to select only options from only certain elements. This is to avoid them from typing in a value which is not what you want them to input. In this case HTML form element – radio buttons could do the job, but what if in some cases, the user has to select more than one value? Check box is the answer, Here I have created an example to demonstrate the way to create check box:

I have created a HTML form with a set of check boxes which allows the user to select a few options from:

1
2
3
4
5
6
7
8
9
10
11
<html>
<form name="aform">
Choose which person the email will send to:
<br>
<input type="checkbox" name="email" value="email1@phpsuperblog.com">TOM
<br>
<input type="checkbox" name="email" value="email2@phpsuperblog.com">JOHN
<br>
<input type="checkbox" name="email" value="email2@phpsuperblog.com">MARY
</form>
</html>

The HTML form:

Choose which person the email will send to:

TOM

JOHN

MARY

Please notice that the emails above do not exist, they are just for this example.

Similar Posts:

VN:F [1.9.13_1145]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.13_1145]
Rating: 0 (from 0 votes)

Add A Comment

*