title: How can I change the text of a label when a button is checked?
body: <p>I am willing to change the text displayed by my heading only if a radio button is checked.I am using <code>input type="radio"</code> so I can style it using CSS. This is what my code looks like:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;h1&gt;What is your favourite class?&lt;/h1&gt;
  
  &lt;div&gt;
    &lt;input type="radio" name="radio" id="radio1" class="radio" /&gt;
    &lt;label for="radio1" style="color:black;font-family:impact;text-align:center;" id='1'&gt;Maths&lt;/label&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>