<html>
<body>
<h1>The Element Object</h1>
<h2>The before() Method</h2>
<div id="myDiv">Hello</div>
<p>Click to insert text before a div:</p>
<button onclick="myFunction()">Click here</button>
<script>
function myFunction() {
const div = document.getElementById("myDiv");
div.before("World!");
}
</script>
</body>
</html>