title: How can I check a checkbox when another checkbox is checked? [JavaScript]
body: <p>So I have a little form which you can see at the bottom. And I want to know how I can make a JavaScript function where if I, for example, check checkbox 3 it will also check checkboxes 2 and 1. I have been on the internet looking for hours now and most stuff either doesn't wanna work or involves jQuery. I'd rather use HTML/JavaScript only.</p>
  
  <p>I thank you for taking your time to at least read this!</p>
  
  <pre><code>&lt;h3&gt;HTML&lt;/h3&gt;
      &lt;label&gt;&lt;input type="checkbox" name="html1" value="html1" id="html1"/&gt;&lt;span class="label-text"&gt;&lt;/span&gt;&lt;/label&gt;
      &lt;label&gt;&lt;input type="checkbox" name="html2" value="html2" id="html2"/&gt;&lt;span class="label-text"&gt;&lt;/span&gt;&lt;/label&gt;
      &lt;label&gt;&lt;input type="checkbox" name="html3" value="html3" id="html3"/&gt;&lt;span class="label-text"&gt;&lt;/span&gt;&lt;/label&gt;
      &lt;label&gt;&lt;input type="checkbox" name="html4" value="html4" id="html4"/&gt;&lt;span class="label-text"&gt;&lt;/span&gt;&lt;/label&gt;
      &lt;label&gt;&lt;input type="checkbox" name="html5" value="html5" id="html5"/&gt;&lt;span class="label-text"&gt;&lt;/span&gt;&lt;/label&gt;
  </code></pre>