The checked attribute is a boolean on <input type="checkbox"> and type="radio". When present, the control is selected by default when the page loads.
Always pair controls with a <label>. Use the same name for a radio group (one choice). Set a clear value for what gets submitted. For <option>, use selected instead.
Baseline · Widely available.
Not deprecated. Standard on checkbox and radio inputs across modern browsers.
Default state, not a live mirror.
After the user clicks, the HTML checked attribute does not rewrite itself. Read the current state with the JavaScript property element.checked; the attribute maps to defaultChecked.
Syntax
HTML Syntax
syntax.html
<input type="checkbox|radio" checked>
Boolean form: write the name alone. checked="" or checked="checked" means the same thing.
Values
Attribute Values
checked is boolean — presence turns the default selection on:
Each checkbox is independent — many can be checked.
checked on Coding and Music sets those defaults.
Same name submits multiple interest=… pairs when more than one is on.
Unchecked Art is omitted from the submission until the user selects it.
Edge Cases & Pitfalls
Most confusion is attribute vs property, or expecting unchecked boxes in the POST body.
IDL
Attribute ≠ live property
defaultChecked mirrors the HTML attribute. element.checked is the current UI state after clicks.
submit
Unchecked means omitted
Unchecked boxes send nothing. Default submitted value is on if you omit value.
radio
One default per group
Mark at most one radio checked in a same-name group. Multiple defaults are invalid markup.
Firefox
Firefox may remember clicks
Firefox can persist dynamic checked state across reloads. Use autocomplete="off" on the control when you need a fresh default every time.
option
Not for <option>
Use selected on options. checked is for checkbox/radio inputs.
Compatibility
Browser Support
checked is an HTML attribute on checkbox and radio inputs. It is not a Node.js, Deno, or Bun API.
✓ Baseline · Widely available
checked
Supported everywhere modern browsers run. Use labels for accessibility; remember Firefox may persist dynamic state unless autocomplete is controlled.
99%Global support (approx.)
Google ChromeAll
Full support
Mozilla FirefoxAll (may persist state)
Full support
Apple SafariAll
Full support
Microsoft EdgeAll
Full support
OperaAll
Full support
Samsung InternetAll modern
Full support
Internet ExplorerAll
Supported
checkedWidely supported
Bottom line: Safe to use. Pair with labels, clear values, and autocomplete="off" when reload must restore the HTML default in Firefox.
Remember
Key Takeaways
Role: default-selected checkbox or radio on page load.
Boolean — presence means selected by default.
Attribute vs property: HTML → defaultChecked; live UI → .checked.
Submit: only currently checked controls are sent.
One line:checked sets the default selection — use .checked in JavaScript for the current state.
Frequently Asked Questions
On checkbox and radio inputs, checked means the control is selected by default when the page loads. It sets the default state (defaultChecked), not a live mirror of every later click.
Primarily input type="checkbox" and input type="radio". For select options, use the selected attribute instead.
Yes. Presence means true. Writing checked, checked="", or checked="checked" are equivalent.
No. The content attribute stays as written. The live state is the IDL property element.checked. defaultChecked reflects the HTML attribute.
No. Only currently checked checkboxes and radios are included. The submitted value comes from the value attribute (default "on").
No. It is Baseline widely available and standard for checkboxes and radios.