Element: remove() メソッド - Web API | MDN

Element.remove() は DOM から要素を削除します。