The replaceChild() method replaces a child node of a specified element with another node. The new node will take the place of the old one.