Skip to main content

HTML Guide

Bad value “"disabled"” for attribute “disabled” on element “input”.

The disabled attribute is a boolean attribute and must not have a value or should simply be present (disabled or disabled=""). Boolean attributes like disabled indicate presence by their occurrence alone and should not include explicit values.

Incorrect usage:

<input type="text" disabled="yes">
<input type="text" disabled="true">
<input type="text" disabled="false">

Correct usage:

<input type="text" disabled>
<input type="text" disabled="">

Only the presence of the disabled attribute disables the input. The value, if given, is ignored by the browser but causes validation problems if specified incorrectly. For W3C compliance, simply include the disabled attribute without specifying a value.

Although using <input type="text" disabled="disabled"> might still be marked as valid by the W3C Validator, the general recommendation for boolean attributes is to not pass any value.

Learn more:

Related W3C validator issues