HTML5 MathML

HTML5 MathML

HTML5 You can use MathML elements in documents, and the corresponding tags are <math>...</math> .

MathML is a mathematical markup language. It is a standard based on XML (a subset of the Standard General Markup Language) and is a markup language used to write mathematical symbols and formulas on the Internet.

Note: Most browsers support the MathML tag. If your browser does not support this tag, you can use the latest version of Firefox or Safari browser to view it.

In the MATHML top-level element <math>. Each valid MATHML instance must be wrapped in a <math> tag. Additionally, you cannot nest the second <math> inside another element, but you can nest it within any number of other child elements.

Attributes

In addition to the following attributes, the <math> element accepts any attribute of the <mstyle> element.

Class, ID, Style

In order to use style sheets.

DIR

The overall directionality of the formula. Possible values ​​are either ltr (left to right) or rtl (right to left).

HREF

is used to set the hyperlink to the specified URI.

mathbackground

Background color. You can use #rgb, #rrggbb and HTML color names.

mathcolor

Text color. You can use #rgb, #rrggbb and HTML color names.

Show

This enumeration property specifies how the enclosing MathML tag should be rendered. It can have one of the following values:

block, which means that the element will be displayed outside the current span of text, as a block that can be positioned anywhere without changing the meaning of the text;

inline, which means that the element will be displayed within the current span of the text, and cannot be moved out without changing the meaning of the text.

If not present, its default value is inline.

Mode

Approved and deprecated display attributes.
Possible values ​​are: display (has the same effect as display="block") and inline.

Overflow

Specifies the behavior of an expression if it is too long and does not fit within the allowed width.
Possible values ​​are: linebreak (default), , scroll, elide,. truncatescale

<!DOCTYPE html>
<html>  
<head>    
<title>MathML in HTML5</title>  
</head>  
<body>  
<math>    
<mrow>      
<mrow>        
<msup>          
<mi>a</mi>          
<mn>2</mn>        
</msup>        
<mo>+</mo>        
<msup>          
<mi>b</mi>          
<mn>2</mn>        
</msup>      
</mrow>      
<mo>=</mo>      
<msup>        
<mi>c</mi>        
<mn>2</mn>      
</msup>    
</mrow>  
</math>  
</body>
</html>


Continuing Learning
||
<!DOCTYPE html> <html> <head> <title>MathML in HTML5</title> </head> <body> <math> <mrow> <mrow> <msup> <mi>a</mi> <mn>2</mn> </msup> <mo>+</mo> <msup> <mi>b</mi> <mn>2</mn> </msup> </mrow> <mo>=</mo> <msup> <mi>c</mi> <mn>2</mn> </msup> </mrow> </math> </body> </html>
submitReset Code