title: Boolean HTML Attributes
body: <p>There are some attributes in HTML which are "boolean" - browsers treat them as "true" if they are present, regardless of the value. An example of such an attribute is <strong>selected</strong> on the <code>&lt;option&gt;</code> tag. Another is <strong>checked</strong> on <code>&lt;input type="checkbox"&gt;</code>.</p>
  
  <p>If you have a call to <code>setAttribute()</code> for such an attribute, there seems to be no value you can set to have the browsers consistently behave as though the attribute is missing.</p>
  
  <p>For example</p>
  
  <pre><code>option.setAttribute("selected", false)
  </code></pre>
  
  <p>will still mark the option selected. <strong>null</strong>, empty string or <strong>undefined</strong> don't work either. If anyone knows of a value I can set to achieve my goal, please let me know, but I don't think one exists. (Because of some framework code I use, <strong>not</strong> calling <code>setAttribute()</code>, or calling <code>removeAttribute()</code> is difficult.)</p>
  
  <p>I'm trying to find an exhaustive list of such attributes to special case them. Here's what I have so far:</p>
  
  <ul>
  <li><strong>selected</strong> of <code>&lt;option&gt;</code></li>
  <li><strong>checked</strong> of <code>&lt;input&gt;</code></li>
  <li><strong>disabled</strong>, <strong>readonly</strong> of <code>&lt;input&gt;</code>, <code>&lt;select&gt;</code>, <code>&lt;option&gt;</code>, <code>&lt;optgroup&gt;</code>, <code>&lt;button&gt;</code>, <code>&lt;textarea&gt;</code></li>
  <li><strong>multiple</strong> of <code>&lt;select&gt;</code></li>
  </ul>
  
  <p>Please help me complete this list - or point me to an existing one.</p>