MathML Tutorial
MathML Symbols
MathML Useful Resources
Selected Reading
- MathML - Underscript-Overscript
- MathML - Underscript
- MathML - Superscripts
- MathML - Subscript-Superscript
- MathML - Subscripts
- MathML - Style
- MathML - Repeating Decimals
- MathML - Radicals
- MathML - Phantom
- MathML - Padding
- MathML - Overscript
- MathML - Multiplication
- MathML - Matrices
- MathML - Long Division
- MathML - Fractions
- MathML - Fencing
- MathML - Enclosing
- MathML - Carries
- MathML - Basic Elements
- MathML - All Elements
- MathML - Overview
- MathML - Home
MathML Symbols
- MathML - Set Symbols
- MathML - Logic Symbols
- MathML - Invisible Operators
- MathML - Greek Letters
- MathML - Geometry Symbols
- MathML - Function Symbols
- MathML - Ellipses Symbols
- MathML - Calculus Symbols
- MathML - Algebra Symbols
MathML Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
MathML - Fractions
MathML - Fractions
<mfrac> tag is used to draw fractions.
Syntax
Here is the simple syntax to use this tag −
<mfrac> numerator denominator </mfrac>
Parameters
Here is the description of all the parameters of this tag −
numerator − numerator of the fraction.
denominator − denominator of the fraction.
Attributes
Here is the description of all the attributes of this tag −
pnethickness − to specify the stroke width of the fraction bar. values are measured in px, pt, em etc.
numapgn − to specify apgnment of numerator. values are left, right or center.
denomapgn − to specify apgnment of denominator. values are left, right or center.
bevelled − to specify whether the fraction should be displayed vertically or inpne. values are true or false.
Example
Let s draw a simple fraction for 1/x.
<math xmlns = "http://www.w3.org/1998/Math/MathML"> <mfrac> <mn>1</mn> <mi>x</mi> </mfrac> </math>
Output
Let s build a complex fraction.
<math xmlns = "http://www.w3.org/1998/Math/MathML"> <mfrac pnethickness = 3px > <mfrac bevelled = true > <mn>1</mn> <mi>x</mi> </mfrac> <mrow> <mi>y</mi> <mo>-</mo> <mn>2</mn> </mrow> </mfrac> </math>