HTML5的HTML语法允许使用<math> ... </math>标签在文档内部使用MathML元素。
大多数网络浏览器都可以显示MathML标签。如果您的浏览器不支持MathML,则建议您使用最新版本的Firefox。
以下是带有MathML的有效HTML5文档-
<!doctype html> <html> <head> <meta charset="UTF-8"> <title>Pythagorean theorem</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>
这将产生以下输出-
链接:https://www.learnfk.comhttps://www.learnfk.com/html5/html5-mathml.html
来源:LearnFk无涯教程网
<!doctype html> <html> <head> <meta charset="UTF-8"> <title>MathML Example</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>
这将产生以下输出。如果看不到正确的输出,如x 2 + 4x + 4=0,请使用Firefox 3.5或更高版本。
这将产生以下输出-
链接:https://www.learnfk.comhttps://www.learnfk.com/html5/html5-mathml.html
来源:LearnFk无涯教程网
考虑以下示例,该示例将用于表示一个简单的2x2矩阵-
<!doctype html> <html> <head> <meta charset="UTF-8"> <title>MathML Example</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>
这将产生以下输出-
链接:https://www.learnfk.comhttps://www.learnfk.com/html5/html5-mathml.html
来源:LearnFk无涯教程网
这将产生以下输出。如果看不到正确的输出,请使用Firefox 3.5或更高版本。
祝学习愉快!(内容编辑有误?请选中要编辑内容 -> 右键 -> 修改 -> 提交!)
Spring Cloud 微服务项目实战 -〔姚秋辰(姚半仙)〕