Name
<input type=checkbox> — NN 2, 3, 4, 6 MSIE 2,3, 4, 5.5, 6 HTML4.0 WebTV Opera5
Synopsis
<input type=checkbox> (no end tag)
Creates a checkbox input element within a
<form>. Checkboxes are like on/off switches
that can be toggled by the user. Several checkboxes in a group may be
selected at one time. When a form is submitted, only the
“on” checkboxes submit values to the server.
Attributes
-
checked When this attribute is added, the checkbox will be checked by default.
-
name=text Required. Assigns 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=text Required. Specifies the value of this control; this value is passed to the server only if the checkbox is selected. If no value is set, a default 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