Definition of HTML "boolean attribute"

A boolean attribute is a property associated with an element that represents either a true or false value. In a polyglot HTML document, a boolean attribute with a true value is coded with a value that matches the attribute name, as in attribute="attribute". To indicate a false value the attribute should be completely omitted.

Note that the HTML 5 specifications explicitly state that:

The values "true" and "false" are not allowed on boolean attributes.

This is because browsers that look at the coded value for boolean attributes would treat the string "false" as false while browsers that only look for the presence or absence of the attribute would treat that code as true, resulting in very inconsistent behavior.

Note that "true" and "false" are valid values for some non-boolean attributes, in particular enumerated attributes such as the draggable attribute.