I am a heavy user of Go's html/template library. The reason is that it allows me to not write Javascript.

With vanilla JS you have to translate to JSON, then build elements in the front end.

The solution to building elements in JS is to use a framework, but compiling Javascript just never sat right with me. It's like ok, now I have an incomprehensible bundle of minified JS and I probably need to run a JS backend if I don't want to go insane.

Alternatively, you can skip all of that and just template.

I'm excited for htmx but haven't used it yet. Simplicity wins. LAMP stack was great for its simplicity. Go monoliths are a modern solution.

You're conflating two things, dynamically creating HTML is great and lets you avoid JS in a lot of cases. It's whether you should treat your HTML document as the tree of nodes that it is in your programming language or treat it like a string.

https://github.com/Knio/dominate is a Python lib that implements this principal.