Latest web development tutorials

HTML5 MathML

HTML5 può essere utilizzato negli elementi MathML documento tag corrispondente è <math> ... </ math>.

MathML è il Mathematical Markup Language, è un XML (un sottoinsieme dello Standard Generalized Markup Language) di serie basata su per la scrittura di simboli matematici e formule linguaggio di markup su Internet.

Nota: La maggior parte dei browser supportano tag MathML, se il browser non supporta il tag, è possibile utilizzare l'ultima versione di Firefox o Safari browser.


Esempi di MathML

Quanto segue è un semplice esempio MathML:

<!DOCTYPE html>
<html>
   <head>
      <meta charset="UTF-8">
      <title>本教程(w3big.com)</title>
   </head>
	
   <body>
	
      <math xmlns="http://www.w3.org/1998/Math/MathML">
		
         <mrow>
            <msup><mi>a</mi><mn>2</mn></msup>
            <mo>+</mo>
				
            <msup><mi>b</mi><mn>2</mn></msup>
            <mo>=</mo>
				
            <msup><mi>c</mi><mn>2</mn></msup>
         </mrow>
			
      </math>
		
   </body>
</html> 

Prova »

FIG risultati operativi, come segue:

L'esempio seguente aggiunge alcuni operatori:

<!DOCTYPE html>
<html>
   <head>
      <meta charset="UTF-8">
      <title>本教程(w3big.com)</title>
   </head>
	
   <body>
	
      <math xmlns="http://www.w3.org/1998/Math/MathML">
		
         <mrow>			
            <mrow>
				
               <msup>
                  <mi>x</mi>
                  <mn>2</mn>
               </msup>
					
               <mo>+</mo>
					
               <mrow>
                  <mn>4</mn>
                  <mo>⁢</mo>
                  <mi>x</mi>
               </mrow>
					
               <mo>+</mo>
               <mn>4</mn>
					
            </mrow>
				
            <mo>=</mo>
            <mn>0</mn>
				 
         </mrow>
      </math>
		
   </body>
</html> 

Prova »

FIG risultati operativi, come segue:

L'esempio che segue è una matrice 2 × 2, è possibile visualizzare l'effetto in Firefox 3.5 e superiori:

<!DOCTYPE html>
<html>
   <head>
      <meta charset="UTF-8">
      <title>本教程(w3big.com)</title>
   </head>
	
   <body>
      <math xmlns="http://www.w3.org/1998/Math/MathML">
		
         <mrow>
            <mi>A</mi>
            <mo>=</mo>
			
            <mfenced open="[" close="]">
			
               <mtable>
                  <mtr>
                     <mtd><mi>x</mi></mtd>
                     <mtd><mi>y</mi></mtd>
                  </mtr>
					
                  <mtr>
                     <mtd><mi>z</mi></mtd>
                     <mtd><mi>w</mi></mtd>
                  </mtr>
               </mtable>
               
            </mfenced>
         </mrow>
      </math>
      
   </body>
</html> 

Prova »

FIG risultati operativi, come segue: