Skip to content
Related Articles
Get the best out of our app
Open App

Related Articles

HTML DOM removeChild() Method

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

The HTML  DOM removeChild() method 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 a single parameter child which is mandatory. It represents the node that needs to be removed.

Return Value: It returns a node object which represents the removed node, or null if the node doesn’t exist. 

Example: In this example, we will remove a list item using node.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");



We have a complete list of HTML DOM methods, to check those please go through this HTML DOM Object Complete reference article.

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

We have a Cheat Sheet on Javascript where we covered all the important topics of Javascript to check those please go through Javascript Cheat Sheet-A Basic guide to JavaScript.

My Personal Notes arrow_drop_up
Last Updated : 02 Dec, 2022
Like Article
Save Article
Similar Reads
Related Tutorials