For those looking for something more robust... this is where I'd look: https://github.com/kitajs/html.
Also Honojs (hono.dev) has a built in HTML function which is quite good and I've used extensively.
Also Honojs (hono.dev) has a built in HTML function which is quite good and I've used extensively.