IMHO, it's a bad idea to use paragraph tags for chapter headings. Use heading tags (h1...h6) with ids instead. For example:
Code:
<h1 id="c1">Chapter 1</h1>
This is equivalent to:
Code:
<a name="c1"></a><h1>Chapter 1</h1>
You may want to check out
Sigil. Even though it's a ePub editor you can use it to create .mobis too, because both KindleGen and Calibre will accept epubs as source files. You can also automatically generate NCX and HTML TOCs with it if you use heading tags.