You are here: Reference > HTML > attributes > CHECKED (input(checkbox, radio))

CHECKED attribute (input(checkbox, radio))

Browser support:
Specifies the initial state of a check box or a radio button.
JavaScript page for this attribute: checked. You can find other example(s) there.

Possible values:

This attribute has no values.
Specifying the CHECKED attribute with an arbitrary value has the same effect as specifying it with no value.
For example, all of the following declarations have the same effect: checked, checked="true", checked="false", checked="on", checked="checked".
Although Boolean attributes may be used with no value in HTML, for XHTML compatibility, always use the CHECKED attribute in the following format: checked="checked".

Example HTML code 1:

This example illustrates the use of the CHECKED attribute:
<input type="checkBox" /> Initially not checked <br />
<input type="checkBox" checked="checked" /> Initially checked
Did you find this example helpful? yes no

Supported by tags:

External links:

User Contributed Comments

Post Content

Post Content