I would like to understand how elements behave after they were appended to the page.
Code:
var newElem = document.createElement("div");
document.appendChild(newElem);

newElem.setAttribute("name", "something");
Will the attribute applied in the code above automatically added to the page as well? And if so, can I rely on that?


Thank you.