Checkbox

The <input> element with type="checkbox" allows to select single values for submission.

No data associated with the checkbox is sent unless the state is checked. Thus, the server should handle the missing parameter correctly, for example using the default value.

attributes

attribute description
id, name Name of element.
checked If present, the checkbox is toggled on by default.
indeterminate If present, indicates that the value of the checkbox is indeterminate rather than true or false.
value Value for submission. Default value is string "on".