Checkbox in HTML form
<input type="checkbox" name="name" value="any_value" checked>
Checkboxes are objects of a HTML form which behaves like a toggle switch. i.e, a checkbox can be in one of the two states, either checked or unchecked.
From a group of checkboxs user can select multiple options.
Attributes of Checkbox Field:
Value: Specifies the value of the checkbox. This value will be returned if the checkbox is checked.
Checked: If given, the checkbox will be checked by default else, it will not be checked. Don't add any single or double quote to this.
This will give the output like :
Favourite Color(s): Blue Red Green
We can keep more than one button selected or checked.
This article is written by plus2net.com team.