Maybe some people find this interesting. I created a little DSL to generate HTML with JavaScript. Here is an example:var things = [{text: "Hello"}, {text: "World"}]; with(HTML) { var html = div({ id: "foo", content: a({ href: "#", content: ["test", span("bar")] }) }) + div({ className: "baz", content: map(things, function (thing) { return p(thing.text) }) }); alert(html) document.write(html) } Yes