<!DOCTYPE html>
<html lang="en-US">
  <head>
    <meta charset="utf-8">
    <title>Simple button example</title>
    <style>
      html {
        font-family: sans-serif;
      }

      h1 {
        text-align: center;
      }

      button {
        max-width: 480px;
        width: 70%;
        margin: 0 auto;
        display: block;
        font-size: 150%;
        line-height: 1.5;
      }
    </style>
  </head>
  <body>
    <h1>Simple button example</h1>

    <button>Press me!</button>


    <script>

      const btn = document.querySelector('button');

      btn.onclick = function() {
        alert('Ouch, that hurt!');
      }


    </script>
  </body>
</html>
