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
| Value | Behaviour |
|---|---|
| toggle | Cycle through the child expressions on click. |
| statusline | Show the last child in the browser status line. |
| tooltip | Show the last child as a tooltip on hover. |
Example
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.
