html template: how to display?

Same answer as in Triggering a computation (SQL calls cells that depend on a select input somewhere else) - #8 by Fil

The html template literal escapes tags, by design; see GitHub - observablehq/htl: A tagged template literal that allows safe interpolation of values into HTML, following the HTML5 spec for explanations.

The proper way to create html tags is to use html`` at every step. If you create strings with `<some>code`, they become inert strings and can’t be (safely) made into html again.

If you really must do it the unsafe way, you can just use innerHTML:

const div = document.createElement("div");
div.innerHTML = `<some>code`