HTML DOM removeChild() Method Last Updated : 11 Jul, 2025 Comments Improve Suggest changes Like Article Like Report 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. Syntax: node.removeChild(child) 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. html <h1 style="color: green;"> GeeksforGeeks </h1> <h2> DOM removeChild() Method </h2> <p>Sorting Algorithm</p> <ul id="listitem"> <li>Insertion sort</li> <li>Merge sort</li> <li>Quick sort</li> </ul> <button onclick="Geeks()"> Click Here! </button> <script> function Geeks() { var doc = document.getElementById("listitem"); doc.removeChild(doc.childNodes[0]); } </script> Output: 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 aboveEdge 12 and aboveInternet Explorer 5 and aboveFirefox 1 and aboveOpera 7 and aboveSafari 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. Comment More infoAdvertise with us Next Article HTML DOM Label Object V Vishal Chaudhary 2 Follow Improve Article Tags : Web Technologies HTML HTML-DOM Similar Reads HTML | DOM DT Object The DOM dt object is used to represent the HTML <dt> element. The dt element can be accessed using the getElementById() method. Syntax: document.getElementById("id"); Where âidâ is the ID assigned to the dt tag. Example-1: html <!DOCTYPE html> <html> <body> <h1 style = 1 min read HTML | DOM Style borderTopColor Property The borderTopColor property allows us to set/get the color of top border of element. Syntax: It returns the borderTopColor property. object.style.borderTopColorIt is used to set the borderTopColor property. object.style.borderTopColor = "color|transparent|initial| inherit" Return Value:The borderTop 2 min read HTML DOM Style borderLeftColor Property The borderLeftColor property in HTML DOM allows us to set/get the color to the left border of an element. Syntax: It is used to return the borderLeftColor property. object.style.borderLeftColorIt is used to set the borderLeftColor property. object.style.borderLeftColor = "color | transparent | ini 2 min read HTML DOM Paragraph Object The DOM paragraph object is used to represent the HTML <p> element. The p element is accessed by getElementById(). Syntax: document.getElementById("id"); Where âidâ is the ID assigned to the p tag. The below programs illustrate the p object: Property Values align: It is used to set or return t 2 min read HTML DOM Label Object The DOM Label Object is used to represent the <label> element. The Label element is accessed by getElementById(). Properties: control: It is used to return the labeled control.form: It is used to return the address of the form that contains the label.htmlFor: It is used to set or return the va 2 min read HTML DOM Footer Object The DOM footer object is used to represent the HTML <footer> element. The footer element can be accessed using the getElementById() method. Syntax: document.getElementById("id"); Where âidâ is the ID assigned to the footer tag. Example 1: In the below program the footer element is accessed and 1 min read HTML DOM Style borderRightColor Property The borderRightColor property allows us to set/get the color to the right border of an element. Syntax: It is used to return the borderRightColor property. object.style.borderRightColorIt is used to set the borderRightColor property. object.style.borderRightColor = "color|transparent|initial|inherit 2 min read HTML DOM fullscreenElement Property The fullscreenElement property in HTML is used to return the element that is currently in fullscreen. This property may require specific prefixes to work with different browsers. Syntax:document.fullscreenElementReturn Value: Returns the element that is currently in full-screen mode, or null if full 2 min read HTML DOM Location port Property The HTML DOM Location Port property returns or sets the port number of the current URL. Syntax: Get the port property:Set the port property: Property Value: A String, to be assigned as a port Return Value: A String represents the port number of a URL. Example: In this example, we will use the HTML D 1 min read HTML DOM accessKey Property The DOM accessKey property is used to set or return the accesskey attribute of an element. Syntax : For Set the accessKey :HTMLElementObject.accessKey = valueFor Return the accessKey :HTMLElementObject.accessKey Value: character: A character that is used to specify the shortcut key. Return Value: Th 2 min read Like