The MathML <mtd> tag is used to create table data of a table or the matrices in HTML5. It is similar to <td> of a table tag.
Syntax:
<mtd attributes="value"> child elements </mtd>
Attributes: It accepts some attributes which are listed below:
- class|id|style: This attribute is used to hold the styles of the child elements.
- columnalign: This attribute holds the horizontal alignment of the table cells. Possible values are left, right and center.
- href: This attribute is 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.
- rowalign: This attribute holds vertical alignment of the table cells. Possible values are top, bottom and center.
- columnspan: This attribute holds the value that how many columns does the cell extend.
- rowspan: This attribute holds the value that how many rows does the cell extend.
Below example illustrates the MathML <mtd> tag in HTML5:
Example:
html
<!DOCTYPE html>
< html >
< head >
< title >HTML5 MathML mtd tag</ title >
</ head >
< body >
< center >
< h1 style = "color:green" >
GeeksforGeeks
</ h1 >
< h3 >HTML5 MathML < mtd > tag</ h3 >
< math >
< mi >GeeksforGeeks</ mi >
< mo >=</ mo >
< mtable frame = "solid" rowlines = "dashed" align = "axis 1" >
< mtr mathbackground = "green;" >
< mtd >Course</ mtd >
< mtd >Fee</ mtd >
</ mtr >
< mtr >
< mtd >
< mi >C++ STL</ mi >
</ mtd >
< mtd >
< mi > 1499</ mi >
</ mtd >
</ mtr >
< mtr >
< mtd >
< mi >Placement 100 </ mi >
</ mtd >
< mtd >
< mi >9999 </ mi >
</ mtd >
</ mtr >
< mtr >
< mtd >
< mi >DSA Foundation </ mi >
</ mtd >
< mtd >
< mi >7999</ mi >
</ mtd >
</ mtr >
</ mtable >
</ math >
</ center >
</ body >
</ html >
|
Output:

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