In most cases the use of standard elements with default attributes will suffice. However sometimes getting a calculation represented on-screen as the writer intended can be a challenge. There are many attributes which may be applied to individual elements or a group of elements.

Take the following fraction:

Now say you wanted the brackets to only fill a line-height that matches the x = elements. to reduce the size of the brackets which by default are 'stretchy' is to set that attribute to false.. eg:

So <math><mo stretchy = "false">(</mo></math>   or   <math><mo stretchy = "true">)</mo></math>

You may need a combination of these attributes in a calculation:


Another example of an attribute in use is to manipulate a fraction element. In the Styling fractions section, we saw that we can add a font size or decoration to an element by adding the mathsize and mathvariant attributes to the numerator/denominator. you can also use element specific attributes which allow you to customise it further. Take the fraction below for example:


we can remove the horizontal line by adding linethickness = "0" to the <mfrac> tag to give us:


More information of the MathML element attributes can be found on the Mozilla website



Home page

Hide/show contents

Hide / show
content menu

Next page

Next page

Previous page

Previous page


Further Reading

Video link