javascript how to remove an element and all its children code example Example: js remove all child elements from html document.getElementById("myId").innerHTML = '';