
The Complete Idiot's HTML Tag Reference
| Index
| Previous Tag: <INPUT> (BUTTON)
| Next Tag: <INPUT> (FILE)
|
<INPUT> (CHECKBOX)
Creates a check box control for a form.
Support:
-
Attributes:
- ACCESSKEY
= "Text (single character)"
A character to use as a keyboard shortcut for selecting the checkbox.
-
Support:
-
HTML Standard | Internet Explorer | Netscape Navigator |
4.0 and later |
4.0 and later |
Not supported |
Notes:
-
The access key is invoked by using it as a key combination. For example, if you specify ACCESSKEY="P", then the user invokes the key by pressing Alt+P (Windows) or Cmd+P (Mac).
- CHECKED
When present, displays the checkbox as checked.
-
Support:
-
HTML Standard | Internet Explorer | Netscape Navigator |
2.0 and later |
1.0 and later |
1.0 and later |
- CLASS
= "Text"
The style sheet class used by the tag.
-
Support:
-
HTML Standard | Internet Explorer | Netscape Navigator |
4.0 and later |
4.0 and later |
4.0 and later |
Notes:
-
You can specify two or more classes; be sure to separate each class name with a space.
- DISABLED
Prevents the user from being able to click the checkbox.
-
Support:
-
HTML Standard | Internet Explorer | Netscape Navigator |
3.0 and later |
4.0 and later |
Not supported |
- ID
= "Text"
An alphanumeric string that uniquely identifies the tag.
-
Support:
-
HTML Standard | Internet Explorer | Netscape Navigator |
4.0 and later |
4.0 and later |
4.0 and later |
Notes:
-
Although you can use letters and numbers for the ID, the first character must be a letter.
- LANG
= "Text"
The language used by the tag's attribute values and text content.
-
Support:
-
HTML Standard | Internet Explorer | Netscape Navigator |
4.0 and later |
4.0 and later |
Not supported |
- NAME
= "Text"
The name of the checkbox.
-
Support:
-
HTML Standard | Internet Explorer | Netscape Navigator |
2.0 and later |
1.0 and later |
1.0 and later |
Notes:
-
The NAME attribute enables scripts to work with this checkbox.
- With the exception of the RADIO control, all form elements must have a unique name.
- STYLE
= "Text"
The style or styles to use with the tag.
-
Support:
-
HTML Standard | Internet Explorer | Netscape Navigator |
4.0 and later |
4.0 and later |
4.0 and later |
Notes:
-
If you enter multiple style properties, separate each one with a semi-colon (;).
- TABINDEX
= Positive integer
The control's position with the page's tabbing order.
-
Support:
-
HTML Standard | Internet Explorer | Netscape Navigator |
4.0 and later |
4.0 and later |
Not supported |
Notes:
-
The "tabbing order" is the order in which page elements are selected when the user presses the Tab key.
- TYPE
= "Text"
The type of the INPUT tag.
-
Support:
-
HTML Standard | Internet Explorer | Netscape Navigator |
2.0 and later |
1.0 and later |
1.0 and later |
Notes:
- VALUE
= "Text"
The initial value assigned to the control.
-
Support:
-
HTML Standard | Internet Explorer | Netscape Navigator |
2.0 and later |
1.0 and later |
1.0 and later |
Notes:
-
If you don't include a value, the form script will return a value of "on" for any activated checkbox. Otherwise, the script returns the value that you specified.
Example:
<FORM ACTION="http://www.mcfedries.com/cgi-win/formtest.exe" METHOD=POST>
What's <I>your</I> phobia? (Please check all that apply):
<P>
<INPUT TYPE=CHECKBOX NAME="Ants">Myrmecophobia (Fear of ants)<BR>
<INPUT TYPE=CHECKBOX VALUE="Activated" NAME="Bald" CHECKED>Peladophobia (Fear of becoming bald)<BR>
<INPUT TYPE=CHECKBOX NAME="Beards">Pogonophobia (Fear of beards)<BR>
<INPUT TYPE=CHECKBOX NAME="Bed">Clinophobia (Fear of going to bed)<BR>
<INPUT TYPE=CHECKBOX NAME="Chins">Geniophobia (Fear of chins)<BR>
<INPUT TYPE=CHECKBOX NAME="Flowers">Anthophobia (Fear of flowers)<BR>
<INPUT TYPE=CHECKBOX NAME="Flying">Aviatophobia (Fear of flying)<BR>
<INPUT TYPE=CHECKBOX NAME="Purple">Porphyrophobia (Fear of the color purple)<BR>
<INPUT TYPE=CHECKBOX NAME="Teeth">Odontophobia (Fear of teeth)<BR>
<INPUT TYPE=CHECKBOX NAME="Thinking" CHECKED>Phronemophobia (Fear of thinking)<BR>
<INPUT TYPE=CHECKBOX NAME="Vegetables">Lachanophobia (Fear of vegetables)<BR>
<INPUT TYPE=CHECKBOX NAME="Fear" CHECKED>Phobophobia (Fear of fear)<BR>
<INPUT TYPE=CHECKBOX NAME="Everything">Pantophobia (Fear of everything)<BR>
<P>
<INPUT TYPE=SUBMIT>
</FORM>
How It Looks:
-
| Index
| Previous Tag: <INPUT> (BUTTON)
| Next Tag: <INPUT> (FILE)
|
|