<html>
<body>
<h1>outerHTML</h1>
<p>Click the button to change the header from a h1 to a h3.</p>
<button onclick="myFunction()">Change Header</button>
<script>
function myFunction() {
var x = document.getElementsByTagName("h1")[0];
x.outerHTML = "<h3>You changed the entire header element and it's content!</h3>";
}
</script>
</body>
</html>