Advertisement
Home Open Editor ❯

HTML <input> checked Attribute

Example

<input type="checkbox" checked>

Try this code ❯

Meaning

The checked attribute should be used only for check box <input type="checkbox">and <input radio type="radio"> form controls.

The presence of this attribute indicates that the control should be displayed in its checked state.


Standard Syntax

HTML: <input type="radio|checkbox" checked>

XHTML: <input type="radio|checkbox" checked="checked" />


Advertisement

Attribute Values

Value Description
checked This is a boolean attribute, the presence of a boolean attribute on an element represents the true value, and the absence of the attribute represents the false value.
Home Open Editor ❯
Advertisement