Render Square Root in HTML



As you may be knowing one way to render the square root in html is by using the html code. However, the html code does not render the bar over the number. With mathjax, it is very easy to render the square root. Take a look at the following code


<html>
<head>
<title>Reference Designer Title </title>

<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    tex2jax: {
      inlineMath: [ ['$','$'] ],
      processEscapes: true
    }
  });
</script>

<script type="text/javascript"
  src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>

</head>
<body>
My first html Page.<i>This text is italics</i>

$$\sqrt{b^2 - 4ac}$$


You can also render square root inline as in - what is the value of $\sqrt{450}$
</body>
</html>



Try this example here. and see how square root works