LaTeXML is a LaTeX to XML/HTML/MathML Converter
(mostly from their web site) LaTeXML is a free program, written in Perl, that attempts to faithfully mimic TeX’s behavior, but produces XML instead of DVI. The document model of the target XML makes explicit the model implied by LaTeX. The processing and model are both extensible; you can define the mapping between TeX constructs and the XML fragments to be created. A postprocessor, latexmlpost converts this XML into other formats such as HTML5 or XHTML, with options to convert the math into MathML (currently only presentation) or images.
If you’re lucky, all that should be needed to convert a TeX file, mydoc.tex to XML, and then to HTML would be:
latexml --dest=mydoc.xml mydoc latexmlpost -dest=somewhere/mydoc.html mydoc.xml
This will carry out a default transformation into HTML5, which represents mathematics using MathML. Using an extension of xhtml would generate XHTML including MathML. Adding the option --format=html4 will generate HTML (version 4), using images to represent the math.