This site is mobile accessible. Press the "Tap Here" button to use a smaller font-size.



Smartphone icons created by Freepik - Flaticon

JS HTML DOM

Add a new HTML Element.

This is a paragraph.

This is another paragraph.

// Create a new paragraph(element node)
const para = document.createElement("p");
const node = document.createTextNode("This is new.");
// append Child node to div1 element
para.appendChild(node);
const element = document.getElementById("div1");
element.appendChild(para);