using dom in javascript displaying tags code example
Example 1: change text of element js
document.getElementById("p1").innerHTML = "New text!";
Example 2: java script remowechild an element from the DOM
let node = document.getElementById("nested");
if (node.parentNode) {
node.parentNode.removeChild(node);
}