The first step is to export your book from InDesign, Word, or PDF:
If you’re working in Word, you may need to convert footnotes to endnotes before exporting:
Open the HTML (or ePub file) in Sigil:
Time to validate your files. You want to see ZERO errors: https://www.ebookit.com/tools/bp/Bo/eBookIt/epub-validator