MyInternships.in

HTML5 MathML

HTML5 MathML actiontype Attribute

The actiontype attribute belongs to the <maction> element and selects which interactive behaviour applies to its children - for example toggle, statusline or tooltip. It is a legacy interactivity feature.


Definition and Usage

actiontype tells the browser what <maction> should do when the user interacts with the expression. The classic value is toggle, which cycles through the child expressions on click. Others include tooltip and statusline.

Values

ValueBehaviour
toggleCycle through the child expressions on click.
statuslineShow the last child in the browser status line.
tooltipShow the last child as a tooltip on hover.

Example

A toggle action
Example
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>MathML actiontype attribute</title>
</head>
<body>
  <math display="block">
    <maction actiontype="toggle" selection="1">
      <mn>1</mn>
      <mn>2</mn>
    </maction>
  </math>
</body>
</html>
⚠️

<maction> and actiontype are not in MathML Core; most browsers render only the selected child. Use JavaScript for real interactivity.

Key Takeaways

  • actiontype selects the interactive behaviour of <maction>.
  • toggle, statusline and tooltip are the classic values.
  • Support is minimal - treat it as a fallback only.

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