Native controls / Interactive demo

Checkbox states

A side-by-side look at checkedness and indeterminateness. Compare native controls initialized using IDL attributes and content attributes.

Read the explainer →

01 / State comparison

IDL attributes vs. content attributes.

4 states / 2 variations

Try it: Tab to a checkbox, then press Space to toggle.

Initial state IDL Attribute Content Attribute
Without indeterminateness
Unchecked
Checked
With indeterminateness
Unchecked
Checked

Interacting with a checkbox changes its state, and can be reset using the button above.