Skip to main content
HTML Validation

Bad value X for attribute “checked” on element “input”.

About This HTML Issue

checked is a boolean attribute and should not have a value; it must be written as just checked.

The checked attribute is used with <input> elements of type checkbox or radio. As a boolean attribute, it is either present (interpreted as true) or omitted (false). Adding any value, like checked="true", is not valid and causes a validation error. The correct usage is simply checked.

Incorrect example:

<input type="checkbox" checked="true">

Correct example:

<input type="checkbox" checked>

Example in context:

<!DOCTYPE html>
<html lang="en">
<head>
  <title>Checkbox Example</title>
</head>
<body>
  <label>
    <input type="checkbox" checked>
    Subscribe to newsletter
  </label>
</body>
</html>

Last reviewed: July 22, 2025

Was this guide helpful?

Find issues like this automatically

Rocket Validator scans thousands of pages in seconds, detecting HTML issues across your entire site.

Ready to validate your sites?
Start your free trial today.