H I O X INDIA
FREE HTML Tutorial
Google
Web hscripts.com
 HOME  ||  Scripts  ||  Purchase  ||  Tutorials  ||  Images  ||  Tools  ||  Directories 
  :-)  Send Page   :-)   Feedback   :-)   Register   :-)   Links   :-)   Support   :-)   Bookmarks :-)  
 Forums   Hosting   Internet Stats   Easy Calculation   FUN Games 

HTML Tutorial
Introduction
How To
HTML Tags
html, head, body
Text Manipulation
IMAGES
Special Effects
Using Tables
Forms
Other Topics
Ask Your Doubts
Feedback





HTML Check Box Tag


Topic

How to create a checkbox in html?
How to make check box pre selected?
How to disable check box?



Explanation

Check Box

Example Code:
<form name=myform>
<input type="checkbox" name=mybox value="1">one
<input type="checkbox" name=mybox value="2">two
<input type="checkbox" name=mybox value="3">three
</form>


Result:
one two three

Definition:
Here we define the check box using "input" tag. We give a attribute called "TYPE=checkbox" in the tag which defines the type as a checkbox.
The attribute "name" should be defined and be same.
The value in this case will be used only during form processing.

Pre selected Checkbox
We can make a check box pre selected (checked) even before the users try to select, using the entry "checked"

Example Code:
<form name=myform>
<input type="checkbox" name=mybox value="1" checked>one
<input type="checkbox" name=mybox value="2" >two
<input type="checkbox" name=mybox value="3" checked>three
</form>


Result:
one two three

Non Editable / Non Selectable check box
We can make a Checkbox non selectable (disable) using the entry "disabled"

Example:
<form name=myform>
<input type="checkbox" name=mybox value="1" disabled>one
<input type="checkbox" name=mybox value="2" disabled>two
<input type="checkbox" name=mybox value="3" disabled>three
</form>


Result:
one two three




privacy policy     license     sitemap
© 2004-2005 HIOX INDIA - hioxindia.com

Other Links