<?xml version="1.0" encoding="utf-8"?>

Checkboxes

Checkboxes

The type="checkbox" attribute of the <input> tag introduces checkboxes. This type of control allows users to select one or multiple options from a pre-defined set of options, unlike radio buttons that only select one option. For example, a food delivery website can let customers build their own pizza. In that case, checkboxes are the best option for letting users choose the ingredients they want to put inside.

Pro Tip: Same as with radio buttons, use the checked attribute if you want to select a checkbox by default.

Improve your UX & Product skills with interactive courses that actually work