title_body: How to build an epub starting from a bunch of HTML files?
upvoted_answer: I assume you don't write the HTML directly, but use something like MarkDown or reST. But even if you do, you should look at Pandoc.
  
  The program can read HTML and generate EPUB 2 or EPUB 3 (among others).