So entfernen Sie den Inhalt eines HTML -Elements

const elementParent = document.getElementById('parentEl');
const elementToRemove = document.getElementById('childEl');
elementParent.removeChild(elementToRemove);