This MSP demonstrates different examples of formatting output.
2 Sin[x]
Sin[x]^2
<math xmlns='http://www.w3.org/1998/Math/MathML' mathematica:form='TraditionalForm' xmlns:mathematica='http://www.wolfram.com/XML/'> <mrow> <msup> <mi>sin</mi> <mn>2</mn> </msup> <mo>(</mo> <mi>x</mi> <mo>)</mo> </mrow> </math>
<math xmlns='http://www.w3.org/1998/Math/MathML' mathematica:form='StandardForm' xmlns:mathematica='http://www.wolfram.com/XML/'> <msup> <mrow> <mi>Sin</mi> <mo>[</mo> <mi>x</mi> <mo>]</mo> </mrow> <mn>2</mn> </msup> </math>