JSFiddle - React, Tailwind, and code Playground

HTML

<!DOCTYPE html>
<html>

<head>
    <title>My First Webpage</title>
    <meta charset="UTF-8">
    <link rel='stylesheet' href='../css/style.css'>
    <script src='../javascript/main.js'></script>
</head>

<body>
    <p onclick="update_text(this)">Hello World!</p>
</body>

</html>

JavaScript

function update_text(element)
{
    element.innerHTML = "Hello Other!";
    
    // You can also use innerText
    // element.innerText = "Hello Other!";

    console.log("JS Ran");
}