From Mr. V Wiki Math
Basics
To render any math equation, the math equation must be between <math></math> i.e., <math>f(x)=x^2</math> gives Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle f(x)=x^2}
.
Common math commands =
Superscript: <math>x^{5+y}</math> rendered: 
Subscript: <math>x_{5+t}</math> rendered: 
Both at the same time: <math>x_{5+t}^{5+y}</math> rendered:
123