HTML <checkbox> Tag

HTML <checkbox>

<input> elements of type checkbox are rendered by default as square boxes that are checked (ticked) when activated.

Using checkbox is a good option when you want to give your visitors the option to choose several items from a group of choices. In that regard, the checkbox works opposite of a radio button, which only allows you to select one item from a group of choices.

Checkboxes are a fundamental input component typically represented by an empty box in the unselected state and a box with a checkmark (hence the checkbox name) when selected. They are used to represent a boolean choice, each correlating to a value choice.

A scripting language such as PHP will easily handle this form element, returning all elements the user has checked. I hope to resolve common problems you may be having with this tutorial.

Checkbox Example 1:

Output:

Java
Html
Php

Checkbox Example 2:

Radio Output:


Choose your interests