Text boxes are designed to carry only the plain text, without any formatting; so it highly limits the repertoire of expression you can write to something like
x³ = ln(y) + (x+1)√y
In this expression, I used no HTML markup, to mimic this situation, used only Unicode characters. (Sorry, even the root looks ugly.)
No, this is not a way to represent mathematical expression. You can do a lot more (but still, only pretty simple things) if you use the attribute
contenteditable
.
Please see the demo:
http://html5demos.com/contenteditable[
^].
Look at the HTML source of this page to see how to write such HTML.
And, finally, you can combine this idea with new HTML5 feature: the ability to natively show MathML. Please see:
http://en.wikipedia.org/wiki/HTML5[
^],
http://en.wikipedia.org/wiki/HTML5[
^].
MathML will allow to show really complex mathematical notation.
—SA