Both element.remove() and element.parentNode.removeChild(element) are valid ways to remove an element from the DOM. remove() is more modern and convenient as it doesn't require a reference to the parent node. However, removeChild() has better browser compatibility and returns the removed node, which can be useful if you need to reinsert it elsewhere. Both methods trigger the same DOM events and cleanup processes.