数学置标语言
在XHTML或HTML5文件中内嵌MathML

MathML是一种XML，可以通过使用XML命名空间来嵌入XML文件中，例如XHTML文件。现代浏览器例如火狐浏览器版本3以上版本和Opera浏览器9.6以上版本（不完全支持）可以展示XHTML内嵌的MathML。
例如 math-test.xhtml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN" "http://www.w3.org/Math/DTD/mathml2/xhtml-math11-f.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
	<head>
		<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
		<title>Example of MathML embedded in an XHTML file</title>
		<meta name="description" content="Example of MathML embedded in an XHTML file" />
		<meta name="keywords" content="Example of MathML embedded in an XHTML file" />
	</head>
	<body>
		<h1>Example of MathML embedded in an XHTML file</h1>
		<p>
			Given the quadratic equation
			<math xmlns="http://www.w3.org/1998/Math/MathML">
				<mrow>
					<mi>a</mi>
					<mo>&#x2062;<!-- &InvisibleTimes; --></mo>
					<msup>
						<mi>x</mi>
						<mn>2</mn>
					</msup>
					<mo>+</mo>
					<mi>b</mi>
					<mo>&#x2062;<!-- &InvisibleTimes; --></mo>
					<mi>x</mi>
					<mo>+</mo>
					<mi>c</mi>
					<mo>=</mo>
					<mi>0</mi>
				</mrow>
			</math>
			, the roots are given by
			<math xmlns="http://www.w3.org/1998/Math/MathML">
				<mrow>
					<mi>x</mi>
				<mo>=</mo>
					<mfrac>
						<mrow>
							<mo form="prefix">&#x2212;<!-- − --></mo>
							<mi>b</mi>
							<mo>&#x00B1;<!-- &PlusMinus; --></mo>
							<msqrt>
								<msup>
									<mi>b</mi>
									<mn>2</mn>
								</msup>
								<mo>&#x2212;<!-- − --></mo>
								<mn>4</mn>
								<mo>&#x2062;<!-- &InvisibleTimes; --></mo>
								<mi>a</mi>
								<mo>&#x2062;<!-- &InvisibleTimes; --></mo>
								<mi>c</mi>
							</msqrt>
						</mrow>
						<mrow>
							<mn>2</mn>
							<mo>&#x2062;<!-- &InvisibleTimes; --></mo>
							<mi>a</mi>
						</mrow>
					</mfrac>
				</mrow>
			</math>
			.
		</p>
	</body>
</html>
而内联MathML同样被HTML5文件支持。支持的浏览器有当前版本的WebKit（Safari）和Gecko（Firefox）。
例如： math-test.htm
<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8">
		<title>Example of MathML embedded in an HTML5 file</title>
	</head>

	<body>
		<h1>Example of 
			<abbr title="Mathematical Markup Language">MathML</abbr>
			embedded in an 
			<abbr title="HyperText Markup Language">HTML</abbr>
			5 file
		</h1>
		<p>
			Given the quadratic equation
			<math>
				<mrow>
					<mi>a</mi>
					<mo>&InvisibleTimes;</mo>
					<msup>
						<mi>x</mi>
						<mn>2</mn>
					</msup>
					<mo>+</mo>
					<mi>b</mi>
					<mo>&InvisibleTimes;</mo>
					<mi>x</mi>
					<mo>+</mo>
					<mi>c</mi>
					<mo>=</mo>
					<mi>0</mi>
				</mrow>
			</math>
			, the roots are given by
			<math>
				<mrow>
					<mi>x</mi>
					<mo>=</mo>
					<mfrac>
						<mrow>
							<mo form="prefix">−</mo>
							<mi>b</mi>
							<mo>&PlusMinus;</mo>
							<msqrt>
								<msup>
									<mi>b</mi>
									<mn>2</mn>
								</msup>
								<mo>−</mo>
								<mn>4</mn>
								<mo>&InvisibleTimes;</mo>
								<mi>a</mi>
								<mo>&InvisibleTimes;</mo>
								<mi>c</mi>
							</msqrt>
						</mrow>
						<mrow>
							<mn>2</mn>
							<mo>&InvisibleTimes;</mo>
							<mi>a</mi>
						</mrow>
					</mfrac>
				</mrow>
			</math>
			.
		</p>
	</body>
</html>