Free email newsletter: “ News


Displaying a square root with HTML

This post shows two ways of displaying a square root with HTML.

Pure HTML for older browsers. The following HTML source

    &radic;<span style="text-decoration: overline">2</span>
is displayed as
Not all browsers display the above equally well, but it is always readable.

MathML for newer browsers. The following HTML source

is displayed as
With MathML being part of HTML5, all modern browsers support MathML. Which is a god-given for those of us who remember the HTML documents that were generated from LaTeX source files by converting formulae to bitmap graphics.

Related reading:

No comments: