Skip to content
Related Articles

Related Articles

Improve Article
HTML5 MathML id Attribute
  • Last Updated : 20 Nov, 2020

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:

  • id: This attribute contains the key that is used by CSS and JavaScript to perform a certain task for a unique element.

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:

  • Firefox



My Personal Notes arrow_drop_up
Recommended Articles
Page :