Kindlegen definitely does, Harry.
Kindlegen takes:
Code:
p.author {
margin-top:0in;
margin-bottom:12pt;
text-indent:0in;
text-align:center;
font-style:italic;
font-weight:bold;
}
h1 {
margin-top:24pt;
margin-bottom:24pt;
text-indent:0in;
text-align:center;
font-size:16pt;
font-weight:bold;
}
...
<p class="author">Donna Smillie</p>
...
<h1 id="toc">Table of Contents</h1>
and turns it into:
Code:
<p height="0" width="0" align="center"><b><i>Donna Smillie</i></b></p>
<div height="16"></div>
...
<h1 height="32" width="0" align="center"><font size="5"><b>Table of Contents</b></font></h1>
<div height="32"></div>
(I used Kindlegen to create a MOBI file from an HTML file, then used mobiunpack.py to extract the HTML from the resulting MOBI file.)
Edit to add: I'm less sure now of the other two tools I mentioned (I haven't checked their output in the same way) - will have to do a similar exercise with them to see what they produce. (And I really must stop having "afterthoughts" like this when posting! Heh!)
End of edit.