<!DOCTYPE html>
<html>
<body>

<p>Click the button to change the HTML content of the document.</p>

<button onclick="myFunction()">Try it</button>

<script>
function myFunction() {
    document.body.innerHTML = "Some new HTML content";
}
</script>

</body>
</html>