<html>
<body>
<p>Click the button to change the text of this paragraph.</p>
<p>This is also a paragraph.</p>
<button onclick="myFunction()">Try it</button>
<script>
function myFunction() {
document.getElementsByTagName("P")[0].innerHTML = "Hello World!";
}
</script>
</body>
<!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_document_getelementsbytagname2 by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 27 Jan 2020 03:01:44 GMT -->
</html>