Skip to content
Related Articles

Related Articles

HTML | DOM removeChild() Method

View Discussion
Improve Article
Save Article
  • Last Updated : 10 Jun, 2022

The removeChild() method in HTML DOM is used to remove a specified child node of the given element. It returns the removed node as a node object or null if the node doesn’t exist.


Parameters: This method accepts single parameter child which is mandatory. It represents the node which need to be remove.
Return Value: It returns a node object which represents the removed node, or null if the node doesn’t exist. 


<!DOCTYPE html>
            HTML DOM removeChild() Method
        <h1 style="color: green;">
            DOM removeChild() Method
<p>Sorting Algorithm</p>
        <ul id = "listitem"><li>Insertion sort</li>
            <li>Merge sort</li>
            <li>Quick sort</li>
        <button onclick = "Geeks()">
            Click Here!
            function Geeks() {
                var doc = document.getElementById("listitem");

Before click on the button: 


After click on the button: 


Supported Browsers: The browser supported by DOM removeChild() method are listed below: 

  • Google Chrome 1 and above
  • Edge 12 and above
  • Internet Explorer 5 and above
  • Firefox 1 and above
  • Opera 7 and above
  • Safari 1.1 and above


My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!