<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>JavaScript</title>
  <script>
    function initiate() {
      const element = document.getElementById("subtitle");
      alert("The id is: " + element.id);  // "The id is: subtitle"
    }
  </script>
</head>
<body onload="initiate()">
  <section>
    <h1>Website</h1>
    <p id="subtitle">The best website ever!</p>
  </section>
</body>
</html>