Pandoc
Pandoc is the Swiss army knife for converting between document formats. The default syntax for code block annotation in Entangled (using curly braces to delimit attributes) was designed to work well with Pandoc.
Warning
Fair warning, using Pandoc to generate documents that are both functional and pretty requires some technical skill: HTML, CSS and a small sigh of JS won't hurt.
Generating useful HTML
The default HTML generated by Pandoc is a bit spartan, but you can rework it to do anything you want. You'll want to start with the default template and work your way out from there:
After you modified the template you can use --template=template.html to use your own custom template. You'll also want to customize the CSS, you can do this with the --css flag. Make sure to use the -s standalone flag to generate a standalone web page. For technical and scientific content you'll want to use some system of references. I prefer to store references in an external ref.bib BibTeX file and add the --citeproc --bibliography=ref.bib flags. For equations, add --mathjax.
If you don't want to tweak the CSS of your document manually, you may want to use some engine like Bootstrap or MaterializeCSS, or search for a list of CSS frameworks to find one you like.
Filters
Pandoc has a filter system that lets you filter, treat, maltreat and glorify the output in countless ways. You can use any language to write these filters through the JSON API, but I prefer to use the built-in Lua support to write my filters. Relevant links: Lua 5.4 reference manual (check with pandoc --version to see which version of Lua you need), and the Pandoc documentation on Lua filters. Pro tip: to debug filters it is often useful to inspect the output in native Pandoc format using -t native. This dumps the abstract syntax tree of your entire document.