zoukankan      html  css  js  c++  java
  • HTML5-MathML-基础篇

    MathML是数学标记语言,是一种基于XML(标准通用标记语言的子集)的标准。用来在互联网上书写数学符号和公式的置标语言。

    注意:大部分浏览器都支持MathML标签,如果你的浏览器不支持该标签,可以使用最新版的Firefox或Safari浏览器查看。

    <!DOCTYPE html>
    <html>
        <head>
            <meta charset="UTF-8" name="author" content="赵慧娟">
        </head>
        <body>
            <math>
                <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>

    运行结果:

    下面添加了一些运算符

    <!DOCTYPE html>
    <html>
       <head>
          <meta charset="UTF-8">
          <title></title>
       </head>
       <body>
          <math>
             <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> 

    运行结果:

    2×2矩阵

    <!DOCTYPE html>
    <html>
        <head>
            <meta charset="UTF-8" name="author" content="赵慧娟">
        </head>
        <body>
            <math>
                 <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>

    运行结果:

  • 相关阅读:
    DS博客作业02--栈和队列
    DS博客作业03--树
    C博客作业05--指针
    C语言博客作业04--数组
    C博客作业03--函数
    C博客作业02--循环结构
    C博客作业01--分支、顺序结构
    我的第一篇博客作业
    java购物车案例
    第三周-自主学习任务-面向对象基础与类的识别
  • 原文地址:https://www.cnblogs.com/xiaonangua/p/MathML.html
Copyright © 2011-2022 走看看