JSFiddle - React, Tailwind, and code Playground
HTML
<!DOCTYPE html>
<html>
<head>
<title>JavaScript and the DOM</title>
</head>
<body>
<h1 id="myHeading">JavaScript and the DOM</h1>
<p>Making a web page interactive</p>
<script type="text/javascript">
const myHeading = document.getElementById("myHeading");
myHeading.addEventListener("click", () => {
myHeading.style.color = "red";
});
</script>
</body>
</html>