Name
<input type=checkbox> — NN: 2, 3, 4 • MSIE: 2, 3, 4, 5 • HTML 4 • WebTV • Opera3
Synopsis
<input type=checkbox>
Creates a checkbox input element within a
<form>. Checkboxes are like on/off switches
that can be toggled by the user. When a form is submitted, only the
“on” checkboxes submit values to the server. Any number
of checkboxes may be selected within a form.
Attributes
checkedWhen this attribute is added, the checkbox will be checked by default.
name=textAssigns a name to the checkbox to be passed to the form-processing application if selected. Giving several checkboxes the same name creates a group of checkbox elements, allowing users to select several options with the same property.
value=textSpecifies the initial value of the control that is passed on to the server. If not defined, a value of “on” is sent.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access