how to remove element from div html js code example Example: remove div javascript var div = document.getElementById('div-01'); div.remove();