MyInternships.in

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

Base then overscript
Example
<mover accent="true">
  <mi>v</mi>        <!-- base -->
  <mo>&#8594;</mo> <!-- overscript (right arrow) -->
</mover>

Attributes

AttributeDescription
accenttrue draws the overscript as a tight accent; false keeps it as a limit.
alignHorizontal alignment of the overscript over the base.

Example

A vector with an arrow accent
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>&#8594;</mo>
      </mover>
      <mo>=</mo>
      <mover accent="true">
        <mi>a</mi>
        <mo>&#94;</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.

Related HTML Topics

Keep learning with these closely related tutorials.

Ready to use your HTML skills?

Find web development internships and fresher jobs across India.

Browse Web Dev Internships