node create element code example
Example 1: js create element
var newDiv = document.createElement("div");
document.body.appendChild(newDiv);
Example 2: dom create element
var btn = document.createElement("BUTTON"); // Create a <button> element
btn.innerHTML = "CLICK ME"; // Insert text
document.body.appendChild(btn); // Append <button> to <body>