HTML input checked Attribute
HTML <input> tag
Definition and Usage
The checked attribute specifies if the input is pre-checked (pre selected
"on").
This attribute is only used if the type attribute of the input element is set
to "checkbox" or "radio".
This attribute is useful for preselecting inputs in a form, or preserving the
state of a form selection.
Syntax
<input checked="checked" />
|
Attribute Values
Value |
Description |
checked |
Specifies that the checkbox or radio button is checked. |
Browser Support

The attribute is supported in all major browsers.
Example
Source |
Output |
<form action="">
Checked checkbox: <input type="checkbox"
name="cbox" id="cbox" checked="checked" />
</form>
|
|
Try-It-Yourself Demos
input
checked attribute example
How use the checked attribute with a checkbox and radio button.
HTML <input> tag
 |

|
|
See why there are 20,000+ Ektron integrations worldwide.
Request an INSTANT DEMO or download a FREE TRIAL today. |
|
|
|