This project provides CSS files and a template for using Pandoc Pandoc is a “universal document converter.” It is particularly good at generating HTML and LaTeX\LaTeXLATEX from Markdown.
to generate standalone HTML files. It supports most features Pandoc Markdown has to offer, and some extras. The default look can be tweaked via CSS variables, and it does not need JavaScript, even for side notes.
My experience with document interchange led me to classify document formats using the essential distinction that some are "programmable" and some are not. [..]
The reason that this distinction is essential with respect to document interchange is that extracting information from documents in "programmable" document formats is equivalent to the halting problem. That is, it is arbitrarily difficult and cannot be automated in a general fashion.
For example, I conjecture that it is impossible to write a program that will extract the third word from a TeX document.
HTML to LaTeX (htmltolatex) is a Java program for converting HTML (XHTML also supported) pages into LaTeX format (or possibly to other markup formats - which depends only on the configuration). Program is distributed under GNU/GPL licence.