I used LaTeX when writing my programming book (C# Smorgasbord) and I am really glad I didn't use HTML for it. There was just so much out there to make the whole process good and I could really focus on the content with minimal markup. Except all the stuff you need in your preamble that is.
When I had written the book, I just used tex4ht and it spit out HTML that was decent, I could just apply a minimal amount of work and apply some CSS and then I had the epub and mobi.
I'm happy with LaTeX but I'm probably never writing another book (or I might..)!