title: What's the proper value for a checked attribute of an HTML checkbox?
body: <p>We all know how to form a checkbox input in HTML:</p>
  
  <pre><code>&lt;input name="checkbox_name" id="checkbox_id" type="checkbox"&gt;
  </code></pre>
  
  <p>What I don't know -- what's the technically correct value for a checked checkbox? I've seen these all work: </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;input name="checkbox_name" id="checkbox_id" type="checkbox" checked&gt;
      &lt;input name="checkbox_name" id="checkbox_id" type="checkbox" checked="on"&gt;
      &lt;input name="checkbox_name" id="checkbox_id" type="checkbox" checked="yes"&gt;
      &lt;input name="checkbox_name" id="checkbox_id" type="checkbox" checked="checked"&gt;
      &lt;input name="checkbox_name" id="checkbox_id" type="checkbox" checked="true"&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Is the answer that it doesn't matter? I see no evidence for the answer marked as correct <a href="https://stackoverflow.com/questions/2874949/what-is-the-syntax-for-a-checked-checkbox-in-html">here</a> from the <a href="http://www.w3.org/TR/html4/interact/forms.html" rel="noreferrer">spec</a> itself:</p>
  
  <blockquote>
    <p>Checkboxes (and radio buttons) are on/off switches that may be toggled
    by the user. A switch is "on" when the control element's checked
    attribute is set. When a form is submitted, only "on" checkbox
    controls can become successful. Several checkboxes in a form may share
    the same control name. Thus, for example, checkboxes allow users to
    select several values for the same property. The INPUT element is used
    to create a checkbox control.</p>
  </blockquote>
  
  <p>What would a spec writer say is the correct answer? Please provide evidence-based answers.</p>