Regardless of JSWolf's
opinion about not liking inline ToC...
- It does not look awful...you can style your headers and links however you want to using the appropriate CSS.
- It does not take up ANY space in the flow...its a link...they are non-space taking...
- It is needed if the user wants to have an inline ToC and have their headers take them back to that ToC....which was the OPs question.
- ePubs and some devices/apps do have an external ToC capability. But that was not the OPs question, either.
In conlusion: It doesn't have to look bad....it certainly isn't bad (it's code)...and it's not poor coding. It is how you accomplish what you asked for - regardless of some people's dislike for inline ToC.
BTW, I don't care for inline ToC either, but that makes no difference to the OP. Furthermore, I do believe Amazon/Kindle
requires an inline ToC....
Cheers,