<html>
<body>
<h1>The Document Object</h1>
<h2>The querySelector() Method</h2>
<p>Change the text of the element with id="demo":</p>
<p id="demo">This is a p element with id="demo".</p>
<script>
document.querySelector("#demo").innerHTML = "Hello World!";
</script>
</body>
<!-- Mirrored from www.w3schools.com/jsref/tryit.asp?filename=tryjsref_document_queryselector by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 21 Dec 2022 17:39:43 GMT -->
</html>