# Attributes

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:

$x=\left(\frac{2}{3}+\frac{4}{5}\right)$
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:
$x=\left(\frac{2}{3}+\frac{4}{5}\right)$

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:

$x=\left[\left(\frac{2}{3}+\frac{4}{5}\right)\right]$

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:

$\frac{2}{4}$

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

$\genfrac{}{}{0}{}{2}{4}$

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