<!DOCTYPE html>
<html>
<body>
<h1>The Element Object</h1>
<h2>The append() Method</h2>
<ul id="myList">
<li>Coffee</li>
<li>Tea</li>
</ul>
<p>Click "Append" to append several list items to the end of the list:</p>
<button onclick="myFunction()">Append</button>
<script>
function myFunction() {
const li = document.createElement("li");
const li2 = document.createElement("li");
const li3 = document.createElement("li");
li.append("Water");
li2.append("Juice");
li3.append("Wine");
document.getElementById("myList").append(li, li2, li3);
}
</script>
</body>
</html>