HTML Check Button |
Check button is an INPUT, also known as checkbox. It privides multiple choices for user to select.
To define a checkbox, set the type attribute of INPUT to "checkbox".
<input type="checkbox" value="Test Check Box"> Test Check Box
Test Check Box
The value attribute of the checkbox will be used by the handling program. The text next to the checkbox will be shown on the webpage.
To let the checkbox shown as checked, add "checked" to the INPUT:
<input type="checkbox" value="Test Check Box"Test Check Box checked >
Test Check Box
Following code shows checkbox handling using PHP: