For anything slightly more involved I really like Pure as a javascript template engine, http://beebole.com/pure/.
Especially when working with something like json data generated elsewhere.
Especially when working with something like json data generated elsewhere.
This is quick and dirty, but much more elegant than writing HTML in JS.