HTML5 MathML
HTML5 MathML <mover> Tag
The <mover> element places an object above a base expression. It takes two children: the base and the thing drawn over it - often an accent such as a bar, hat or arrow.
Definition and Usage
Use <mover> for vector arrows, hats, bars and overbraces. The first child is the base; the second is the overscript. Set the accent attribute to true so the overscript is drawn tight against the base as an accent rather than a separate limit.
Syntax
Example
<mover accent="true">
<mi>v</mi> <!-- base -->
<mo>→</mo> <!-- overscript (right arrow) -->
</mover>Attributes
| Attribute | Description |
|---|---|
| accent | true draws the overscript as a tight accent; false keeps it as a limit. |
| align | Horizontal alignment of the overscript over the base. |
Example
Example
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>MathML mover</title>
</head>
<body>
<math display="block">
<mrow>
<mover accent="true">
<mi>v</mi>
<mo>→</mo>
</mover>
<mo>=</mo>
<mover accent="true">
<mi>a</mi>
<mo>^</mo>
</mover>
</mrow>
</math>
</body>
</html>ℹ️
<mover> is part of MathML Core and renders in all modern browsers. Combine with <munder> as <munderover> to place objects both above and below.
Key Takeaways
- <mover> draws an object above a base expression.
- accent="true" makes the overscript a tight accent like a hat or arrow.
- Pair with <munder> or use <munderover> for both positions.
