Open In App

HTML5 MathML id Attribute

The id attribute is a unique identifier which is used to specify the document. It is used by CSS and JavaScript to perform a certain task for a unique element. This attribute is accepted by all the MathML tags.

Syntax:



<element id="">

Attribute Values:

Below example illustrate the id attribute in HTML5 MathML:



Example:




<!DOCTYPE html> 
<html
  
<head
    <title>HTML5 MathML id attribute</title
    <style
        #gfg { 
            font-size:25px; 
        
    </style
</head
  
<body
    <center
        <h1 style="color:green"
            GeeksforGeeks 
        </h1
          
        <h3>HTML5 MathML id attribute</h3
          
        <math
            <math
                <mi mathvariant="bold"
                    GeeksforGeeks 
                </mi
                  
                <br
            </math
            <math
                <mi mathvariant="italic" id="gfg"
                    A Computer Science 
                    Portal for Geeks 
                </mi
            </math
        </math
    </center
</body
  
</html>         

Output:

Supported Browsers: The browsers supported by HTML5 MathML id attribute are listed below:


Article Tags :