You can build scientific symbols in HTML with three approaches: named or numeric character entities for standalone glyphs, the sub and sup elements for simple formulas, and MathML when the notation itself carries meaning. Pick entities for symbols like Δ or ±, sub/sup for H₂O and x², and MathML for fractions, radicals, and matrices. Plain HTML text is the limit worth knowing: it renders fine but can't be read reliably by screen readers as mathematics.

This guide walks through each method in working order, shows what success looks like in a browser, and flags the failure cases that send people back to the drawing board. Google and Bing index all three approaches, but how you mark up the content changes how it reads to assistive technology and how it survives copy-paste into Word or a learning platform.

What the query actually asks for, and what HTML can and cannot do

Most people who type this question want one of three results. They want a Greek letter or math operator to appear correctly on a web page. They want a formula like E = mc² to display with the exponent raised. Or they want a full equation — a fraction, an integral, a square root — to render without an image. HTML handles the first two cleanly and the third only through MathML, which now has broad enough support that images are rarely necessary.

The boundary matters. HTML text is text: it can be styled, copied, searched, and zoomed. An image of an equation is a picture of an equation — it blurs when zoomed, can't be selected as characters, and carries whatever alt text someone remembered to write. That alone justifies learning the markup.

Start with the easiest method that produces a correct result. A single symbol needs an entity. A term with one exponent needs a sup element. An equation with a stacked fraction needs MathML. Reaching for MathML to render the letter μ is overkill, and using plain text for a definite integral produces something no screen reader can interpret.

Step 1: Add prerequisites before you type a single tag

You need a plain text editor and a browser. That's the whole toolchain for entities and sub/sup. MathML is handled natively by current versions of Firefox, Safari, and Chrome, so no plugin or library is required for a first test.

Set up a scratch file with the minimum document skeleton, because a bare fragment without a doctype can land the browser in quirks mode and produce subtle layout differences:

The charset line is not optional. Without UTF-8 declared, a numeric entity may render correctly while a literal character pasted from another document turns into mojibake — the familiar Ã, Â, and †sequences. Save the file as UTF-8 in your editor and keep that meta tag in the head.

If you plan to publish, confirm your host serves the page as UTF-8 or includes the meta tag early in the head. A mismatch between the file's actual encoding and the declared one is the most common cause of "it looked fine locally" complaints.

Step 2: Use character entities for single symbols

An entity is a code that stands in for a character. HTML accepts two forms: named entities such as Δ and numeric entities such as Δ or Δ for the same capital delta. Named entities are readable in source; numeric ones work even when a name is forgotten.

Type the entity directly into your paragraph text and reload the page. The success check is visual: Δ should display as Δ, ± as ±, and µ as µ.

Symbol Named entity Numeric entity Typical use
Δ Δ Δ Change in a quantity
± ± ± Tolerance, uncertainty
µ µ µ Micro- prefix (µm)
° ° ° Degrees of temperature or arc
≈ ≈ ≈ Approximate equality
× × × Multiplication
∑ ∑ ∑ Summation (when inline is enough)
∞ ∞ ∞ Infinity

Two traps catch people here. First, entity names are case-sensitive: Δ and δ produce Δ and δ, which are different symbols with different meanings in physics. Second, µ is the micro sign, not the Greek letter mu. They look nearly identical but are different Unicode code points, and a search or copy-paste may treat them as distinct. If precise identity matters — for example, matching notation in a published paper — use the numeric code for the intended character rather than the convenience entity.

For a quick reference of which entity maps to which character, the W3C's HTML specification lists the complete named character reference table. The table is stable, so a bookmark is more useful than a search each time.

Step 3: Raise and lower indices with sup and sub

Chemical formulas and simple powers use the sup element for superscript and the sub element for subscript. Type H2O and the browser renders H₂O with the 2 lowered and slightly smaller. Type x2 and you get x².

The success check: reload and confirm the 2 sits below the baseline in water and above it in the square. If both render at normal height, your tags are probably escaped — the page is showing the literal angle brackets because something converted them to .

Use these rules of thumb:

Nest sub inside sup for something like the sulfate ion, written SO42−, which yields SO₄²⁻. Keep nesting shallow. Three levels of sub and sup become unreadable at body-text size. Don't use sup for footnote markers in scientific text without separating the two conventions — a superscript 2 in a chemistry paper can mean an exponent, an ion charge, or a citation number, and readers will guess wrong.

For isotope notation, a leading superscript and a leading subscript stack awkwardly in HTML because sub and sup are inline elements that sit side by side rather than one over the other. A workable compromise is to write the mass number as a superscript before the element symbol, as in ² … — but if stacked isotope notation is central to your content, jump to MathML, where msup and msub align properly around a base.

Step 4: Reach for MathML when the notation carries meaning

MathML is an HTML-embeddable markup language for mathematics. It has been part of the HTML standard since HTML5 and is rendered natively in current Firefox, Safari, and Chromium-based browsers, so a basic test needs no JavaScript.

The simplest useful pattern is a fraction. Inside a math element, mfrac takes two children, numerator then denominator:

That renders as a stacked one-half. Swap in msqrt for a square root, msup for a power with a base and exponent as separate children, and msub for a subscript that aligns correctly under its base.

The advantage over sup and sub is structural. In x2, the markup states that x is the base and 2 is the exponent. A screen reader or a conversion tool can act on that relationship. In x2, the relationship exists only visually.

Basic MathML without fancy layout is supported across the major engines. For complex layout — large operators with limits, aligned equation systems, stretchy delimiters — browser rendering quality still varies, and some sites route through a typesetting library for consistent output. Test your specific equations in the browsers your audience actually uses rather than assuming parity.

A side-by-side comparison on the dimensions that matter

The methods aren't interchangeable, and the choice usually comes down to three practical concerns: what the notation needs, who has to read it, and how it survives being copied or indexed.

Dimension Entities sub / sup MathML
Best for Single glyphs Simple exponents and chemical formulas Fractions, radicals, operators with limits
Screen reader interpretation Character is announced if the reader recognizes it Visual only; exponent relationship not conveyed Structural relationships conveyed
Copy-paste into Word or a learning platform Usually clean Usually clean Mixed; some editors flatten or drop structure
Browser rendering consistency Identical everywhere Identical everywhere Core constructs consistent; complex layout varies
Authoring effort One code per symbol Low Higher, and steeper for long equations
Search engine indexing Text is indexed normally Text is indexed normally Text is indexed, but expect variation in how

If your content is a label — "ΔT = 5 °C" — entities cover it and nothing else is warranted. If it's a chemistry worksheet of formulas, sub and sup are the pragmatic choice unless accessibility requirements demand MathML. If it's a physics textbook page with integrals and fractions, MathML is the only option that keeps the math as math.

Where each approach breaks, and the fix

Failure cases are predictable once you know the symptoms.

Literal tags appear on the page. You see as text instead of a lowered number. Something escaped the angle brackets — often a CMS sanitizer or a Markdown renderer treating the markup as code. Check the page source to confirm whether the tags are escaped; if they are, adjust the editor's HTML mode or the sanitizer's allowed tags.

Mojibake replaces accented or special characters. The encoding mismatch from Step 1. Confirm the file is saved UTF-8 and the charset meta tag is present and early. Re-saving and re-uploading fixes it.

MathML renders as unstyled text in one browser but fine in another. Layout complexity, not a bug in your file. Simplify to core constructs or accept that complex layout needs a rendering library. Test on the browsers your audience uses before publishing.

Copy-paste into a document loses the exponent. Some editors paste x2 as plain "x2" with no formatting. If round-tripping to Word or a learning management system matters, test the paste path early — it can change your choice of method more than browser rendering does.

A formula looks right at 16px but breaks at 200% zoom. Sub and sup shrink relative to surrounding text, so deep nesting becomes illegible. Rewrite with MathML or reduce the nesting depth.

A worked example: one equation in three methods

Take the formula for the area of a circle, A = πr², and a slightly harder case, the quadratic formula. The circle is trivial; the quadratic formula exposes the difference.

For the circle, an entity plus a sup element is enough: A = πr2. One line, renders everywhere, copies cleanly. This is the correct choice at this complexity.

For the quadratic formula, x = (−b ± √(b² − 4ac)) / 2a, written as an inline fraction, plain HTML forces a compromise. You can write it linearly as x = (−b ± √(b2 − 4ac)) / 2a and it will be correct but flat — the fraction becomes a slash. MathML renders it stacked:

The markup is longer, but the structure says "fraction whose numerator contains a square root" — a claim plain text can't make. For a single occurrence on a blog post, the flat version may be acceptable. For a reference page where readers will return to the formula repeatedly, MathML earns its complexity.

A rough time estimate for authoring: a symbol or simple formula takes seconds either way; a moderately complex equation in MathML takes several minutes to write and verify, and that cost is why many teams keep a small library of reusable equation snippets.

Making symbols accessible and searchable

Accessibility is where entities and sup/sub quietly fail. A screen reader encountering x2 often reads "x two" without signaling the exponent, and a reader encountering a named entity may announce the character by name or skip it depending on the reader and the character. MathML exposes the structure and is the better default when the audience includes assistive technology users.

A practical middle path: wrap the equation in a container and add a plain-language description. Something like a paragraph reading "x squared equals four" beside the visual formula helps anyone whose reader can't parse the markup, and it's the kind of fallback that costs a sentence to write.

Search engines index the text either way, so Δ and Δ both contribute to the page's content. The real indexing question is whether the page's visible text matches what people search for — writing "temperature change (ΔT)" rather than only the symbol gives a search engine both forms to match against.

Version and platform notes worth checking before you publish

Browser support changes, so treat any statement about rendering as something to confirm against the current support tables rather than a permanent fact. MathML Core, the subset of MathML that browsers implement natively, is where the practical support line currently sits; constructs outside that core are where rendering diverges. Check the MDN MathML documentation or caniuse's MathML entry against the browsers your audience uses, and confirm on the maker's site for any specific version you must support.

For publishing pipelines, note that many content management systems and Markdown renderers strip unknown tags by default. If MathML disappears when you save, look at the sanitizer's allowlist before assuming your markup is wrong. Word, Google Docs, and most learning management systems accept pasted equations inconsistently; test the paste path rather than assuming it works.

One more platform distinction: email clients are far less forgiving than browsers. Complex MathML in an email may render as source text. For newsletters, an image with thorough alt text remains the more reliable choice despite its drawbacks.

FAQ

Can I use Unicode characters directly instead of entities?

Yes. Pasting a Δ or a √ directly into a UTF-8 document works in every modern browser. Entities are more explicit and survive the copy-paste of a file saved in the wrong encoding, which is why some style guides prefer them. For symbols with rare or confusable Unicode forms, the entity makes the intent visible in the source.

Does MathML hurt SEO?

No — the text inside MathML is indexed like other page text. The practical concern is that some search snippets and crawlers may render equations differently from a browser, so don't bury critical information in a formula alone. State the key result in surrounding prose as well.

What's the minimum I need to know if I just want one exponent on a page?

Use and be done. Keep a doctype and UTF-8 charset in place, write E = mc2, and verify it renders raised in your browser and survives a copy-paste into the destination system. That's the entire workflow for the simplest case.

Should I use an image of an equation instead?

Only when the receiving platform can't render HTML or MathML — some email clients, some legacy tools. An image can't be selected, zoomed cleanly, or read by a screen reader unless carefully described, so it's a fallback rather than a first choice.