Checkboxes
Posted by admin | Posted in HTML Tutorial | Posted on 11-08-2010-05-2008
0
Checkboxes allow the user to select multiple choices for a single question. for example if we need multiple selections for a single question.
Checkboxes are another type of <input /> form. We set the type attribute to check and we also must set a name and value attribute for them to be at all helpful.
Example:
- <input type=”checkbox” />
- <input type=”checkbox” /><input type=”checkbox” />
Checkboxes are used for instances where a user may wish to select multiple options, a sort of check all that apply question.
It is possible to precheck the input boxes for your viewers using the checked attribute. Simply set the checked attribute to yes or no.
Example:
- name=”sports” value=”football” />
- <br />
- Baseball: <input type=”checkbox”
- name=”sports” value=”baseball” />
- <br />
- Basketball: <input type=”checkbox” checked=”yes”
- name=”sports” value=”basketball” />
