JSFiddle - React, Tailwind, and code Playground

HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
  <head>
    <title>JavaScript Challenges</title>
    <style type="text/css">
    #emailpara {visibility:hidden;}
    </style>
  </head>
  <body>
    <form action="">
      <fieldset>

        <legend>Email subscriptions</legend>

        <p id="subscribepara">
          <label>
            <input type="checkbox" name="subscribe" id="subscribe">
            Yes! I would like to receive the occasional newsletter via email.
          </label>
        </p>

        <p id="emailpara">
          <label>
            Email Address:
            <input type="text" name="email" id="email">
          </label>
        </p>

      </fieldset>
    </form>
      <script type="text/javascript">
document.getElementById('subscribe').onclick = document.getElementById('subscribe').checked ? document.getElementById('emailpara').style.visibility = 'visible' : document.getElementById('emailpara').style.visibility = 'hidden';
      </script>
  </body>
</html>