The MathML mathsize attribute in HTML5 is used to specify the size for the content. The possible values are small, normal, big or a custom length value. This attribute is accepted by <mi>, <mn>, <mo>, <ms> and <mtext> tags.
Syntax:
<element mathsize="small | normal | big | length">
Attribute Values: This attribute has four values as mentioned above and described below:
- small: This value sets the content to a smaller size than the normal.
- normal: This value sets the content size to normal. This is the original size of the content.
- big: This value sets the content to a bigger size than the normal.
- length: This value can be used to set the content size to any given value.
The examples below illustrate the MathML mathsize attribute:
Example 1:
<!DOCTYPE html>
<html>
<body style="text-align:center;">
<h1 style="color:green">
GeeksforGeeks
</h1>
<h3>HTML5 MathML mathsize Attribute</h3>
<math>
<ms lquote="„" rquote=" “"
mathcolor="Red" mathsize="small">
A Computer Science Portal for Geeks
</ms>
</math>
</body>
</html>
Output:
Example 2:
<!DOCTYPE html>
<html>
<body style="text-align:center;">
<h1 style="color:green">
GeeksforGeeks
</h1>
<h3>HTML5 MathML mathsize Attribute</h3>
<math>
<ms lquote="„" rquote=" “"
mathcolor="Red" mathsize="28px">
A Computer Science Portal for Geeks
</ms>
</math>
</body>
</html>
Output:
Supported Browsers: The browsers supported by HTML5 MathML mathsize attribute are listed below:
- Firefox