Let’s start simple:
var tag = document.createElement("div");
var text = document.createTextNode('Hello World!');
tag.appendChild(text);
document.body.prepend(tag);
This is good for adding a couple tags, but what would be the correct approach to inject complex/nested HTML tags and maybe also forms/controls etc? Is it possible for example to load from a file and then bind events programmatically?