<html>
<body>
<h1>The Element Object</h1>
<h2>The removeChild() Method</h2>
<p>Click "Remove" to remove the element with id="myLI" from the list.</p>
<button onclick="myFunction()">Remove</button>
<ul>
<li>Coffee</li>
<li id="myLI">Tea</li>
<li>Milk</li>
</ul>
<script>
function myFunction() {
const element = document.getElementById("myLI");
element.parentNode.removeChild(element);
}
</script>
</body>
</html>