I did some research into how to make ebooks today. I ran across this article called 4 Ways to Create an ePub eBook which was extremely helpful.
Epubs are Specialized Zip Files
It turns out that ebooks are simply renamed zip files. If you download an epub to your computer and change the extesion to “.zip” you’ll be able to open it and see how it works.
A Web Developers Tools for Making eBooks
There is a free software tool called Calibre that can be used to edit ebooks. I downloaded it and tried it. It let’s you directly edit the html and css of a epub file (which is pretty neat!).
There’s another tool (which I haven’t tried yet) called Sigil Ebook.