In addition to
Tex2002ans's excellent suggestions, you might want to also consider one of the following options:
1. Use a dedicated authoring tool for fiction writers, e.g.,
Scrivener, which allows you to generate epub and Kindle books.
2. Use an epub editor for users without HTML/CSS skills, e.g.
Jutoh or
Atlantis Word Processor.
3. If you're not afraid of using the terminal/command line, check out
pandoc, which will convert markdown text files to epub files (and many other file formats).