A Beginner's Guide to MathML
Another of the most commonly used tags is the <mrow> element. It's sole purpose is to group elements together in a horizontal row.
It's usage is quite simple but it is still particularly useful in MathML since, as we will discuss later, some elements require a specific number of child elements. When you need to contain a complicated expression within one of these elements, we do so by grouping it within an <mrow>.
Here are some of the most useful style attributes with their allowed values:
|mathvariant||Sets the font style||
|mathsize||Sets the base font size||
|mathcolor||Sets the font colour||
|mathbackground||Sets the font colour||
These are applied as attributes either directly to individual token elements, or collectively to a group of elements via the <mstyle> element:
<mn mathcolor="blue" mathvariant="bold">4</mn>
Some web developers may, at first glance, feel uneasy about specifying style information with attributes. We have, after all, spent years driving this out of HTML. But you shouldn't worry.
This is "presentational" MathML and the semantics of this language is the styling. The situation is analagous to SVG, where, for example, the colours are also specified by attributes. It is entirely appropriate to place style information directly into a document whose purpose is to describe how something should be displayed.