MathML- Radical and Root

Written by @m_k_amin 29 May 2013

HTML5 MathML enables you to use simple or complex radicals (roots). It is possible to put radicals inside each other and use complex strings as the radicals roots. The following example starts from defining a simple radical and expand it slowly; so you can learn how to define different types of formulas with radicals.

Code Snippet:

                                                
                                                <!-- this script is provided by https://www.html5freecode.com coded by: Kerixa Inc. -->
<!-- This Script is from www.html5freecode.com, Coded by: Kerixa Inc-->
<script type="text/javascript"
          src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<body style="font-size: 18pt;">

<math xmlns='http://www.w3.org/1998/Math/MathML' display='block'>
  <msqrt>
    <mi>x</mi>
  </msqrt>

	<mspace width="150px"/>

  <mroot>
    <mi>x</mi>
    <mn>3</mn>
  </mroot>
</math>

<math xmlns='http://www.w3.org/1998/Math/MathML' display='block'>
  <msqrt>
    <mrow>
	    <mi>x</mi>
	    <mo>+</mo>
	    <mn>4</mn>
    </mrow>
  </msqrt>

	<mspace width="150px" height="60px" />

  <mroot>
    <mn>x</mn>
    <mrow>
	    <mi>y</mi>
	    <mo>+</mo>
	    <mn>3</mn>
    </mrow>
  </mroot>
</math>

<math xmlns='http://www.w3.org/1998/Math/MathML' display='block'>
	<mspace height="60px" />
  <mroot>
    <mrow>
    	<mi>1</mi>
    	<mo>+</mo>
    	<msqrt>
    		<mn>x</mn>
  		</msqrt>
    </mrow>
    <mn>3</mn>
  </mroot>
</math>

</body>
<div style="text-align: center"><font face="Tahoma"><a target="_blank" href="http://www.html5freecode.com"><span style="font-size: 8pt; text-decoration: none">HTML5 Free Code</span></a></font></div><a target='_blank' href='https://www.html5freecode.com' style='font-size: 8pt; text-decoration: none'>Html5 Free Codes</a>                                                
                                            

Example:


About @m_k_amin

This user is pending a biography.

M

Comments


Here you can leave us commments. Let us know what you think about this code tutorial!

0 / 300

TRENDING POST
1
2
3
4
5
VISITORS
Online Users: 12
Recent Members: Afzal, FOTPU
advertisement 2