<p onclick="change()">Hello World!!</p> <script> function change(){ document.querySelector("p").innerHTML = "Hello JavaScript!!"; } </script>