The trouble with images is that they don't generally resize if you bump up the font size, and even if you can get them to do so, they start looking blurry. Another way is to use tables, like this example:
Code:
<table>
<tr><td rowspan="2">sin <i>θ'</i> – sin <i>θ</i> =</td><td><i>mh</i></td></tr>
<tr><td style="border-top:1px solid black"><i>pd</i></td></tr>
</table>
which shows up as a prettier version of "sin θ' - sin θ = mh/pd".
However, I don't know of any tool that can do transform MathML into this sort of thing automatically.