HTML5 | MathML <maction> tag

The HTML5 MathML <maction> tag is an inbuilt element of HTML5, that is used to show the bind action of any expression. You can use any selection attribute with this element.

Syntax:

<maction> child elements </maction> 

Attributes: The <maction> tag accepts below mentioned attributes:

  • actiontype: This attribute contains three types of action statusline, toggle and tooltip each of them behave differently.
  • class| id| style: This attribute is used to hold the styles of the child elements.
  • href: This attribute used to hold any hyperlink to a specified URL.
  • mathbackground: This attribute holds the value of the math expressions background color.
  • mathcolor: This attribute holds the color of the math expressions.
  • selection: The default value of this attribute is 1 means 1st child element. It holds the selection of the child elements

Below example will illustrates the concept of HTML5 MathML <maction> tag

Example:



filter_none

edit
close

play_arrow

link
brightness_4
code

<!DOCTYPE html>
<html>
    <head>
        <title>HTML5 maction tag</title>
    </head>
    <body>
        <center>
            <h1 style="color:green">GeeksforGeeks</h1>
            <h3>HTML5 <maction> tag</h3>
            <math>
                <maction actiontype="toggle">
                    <mfrac>
                        <mn>25</mn>
                        <mn>10</mn>
                    </mfrac>
                    <mfrac>
                        <mrow>
                            <mn>5</mn>
                            <mo>⋅</mo>
                            <mn>5</mn>
                        </mrow>
                        <mrow>
                            <mn>2</mn>
                            <mo>⋅</mo>
                            <mn>5</mn>
                        </mrow>
                    </mfrac>
                    <mfrac>
                        <mn>5</mn>
                        <mn>2</mn>
                    </mfrac>
                </maction>
            </math>
            <p>Click the number</p>
        </center>
    </body>
</html>

chevron_right


Output:

Supported Browsers: The browsers are supported by HTML5 MathML <maction> tag are listed below:

  • Firefox

Note: (Till now no other browsers supported by MathML elements)

full-stack-img




My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.


Article Tags :
Practice Tags :


Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.