DOM Properties

HTMLInputElement.checked

Build a form with the HTML form generator

Read/write. Represents current checkbox or radio selection, not the authored checked attribute. Changing a radio selection can update other members of its radio group. An unchecked checkbox is generally omitted from submitted form data. Example result: true / false.

Formal Syntax & Structure

html syntaxhtml
element.checked

Return Value

boolean

Property value. Read/write.

Working Example

Example Snippethtml
<input id="demo" type="checkbox" checked><p>  Result:  <output id="result"></output></p><script>  const e = document.getElementById('demo');  const result = value => { document.getElementById("result").textContent = String(value); };  e.checked=false; result(e.defaultChecked+' / '+e.checked);</script>

Browser Compatibility

Minimum supported versions across modern rendering engines

Chrome
1
Yes
Edge
12
Yes
Firefox
1
Yes
Safari
1
Yes
Opera
≤12.1
Yes
Checked desktop BCD snapshot: HTMLInputElement.checked property. Versions denote the recorded start of support (≤ means at least that early), not a guarantee of all behavior. Unresolved mirror and preview rows omitted.
HTML Living Standard
HTML Reference