Home·HTML tags

<math>

Embedding

The MathML root element for formulas; it can be written directly inside HTML.

How to write it<math></math>
Closing tag</math>
Void elementNo — it must be closed
Common attributesdisplay
CategoryEmbedding

How to read this

  • Most tags come in pairs, opening and closing. Only tags with no content — img, br — are left unclosed.
  • Writing </br> for a void element does nothing useful; the browser ignores it or adds an empty line.
  • Appearance is CSS’s job. A tag says what something is; bold or italic is only the consequence.
  • Choosing the tag that matches the meaning helps search engines and screen readers alike. Wrapping everything in div throws that information away.

Frequently asked questions

Q. What is the HTML <math> tag?

The MathML root element for formulas; it can be written directly inside HTML.

Q. How do you write <math>?

As <math></math>. The opening <math> pairs with the closing </math>.

Q. Which attributes are common on <math>?

display are the usual ones.

Q. What group does <math> belong to?

The embedding group.

Tags in the same group

Reference docs