HTML Entity for Minus (−)

Beginner
5 min read
Updated: Sep 2026
1 example
Unicode U+2212

What Is the Minus Entity?

Minus (−) is the mathematical minus sign at Unicode U+2212. HTML5 provides −. Prefer it in equations — it is not the same as the keyboard hyphen -.

Remember
Character     −
Unicode       U+2212
Named entity  −
Hex entity    −
Decimal       −
CSS escape    \2212

Named, hex, decimal, CSS, and a typed character all produce the same glyph: −.

Quick Reference

One table for every form you will actually use.

FormCodeWhere it goes
Named entity−HTML markup (preferred for math)
Direct character−UTF-8 HTML text
Hex entity−HTML markup
Decimal entity−HTML markup
CSS escape\2212Stylesheet content

When to Use Which

SituationUse
Math subtraction and equations− (clearest HTML form)
Need an entity in HTML source−, −, or −
Generated text via ::before / ::aftercontent: "\2212"
Compound words or code operatorsUse ASCII hyphen-minus -
Ranges (pages, dates)Prefer En Dash — –

Live Preview

Minus sign in math and comparison contexts.

Equation 10 − 3 = 7
Large glyph −
Named entity − → −
vs hyphen - −  |  -
With entities Named: − | Hex: − | Decimal: −

Complete HTML Example

One page that shows the minus sign with named, hex, decimal, and CSS forms. Use View Output or open the live editor.

Named + Hex + Decimal + CSS

Four ways to produce − in a single document.

html
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Minus (−)</title>
  <style>
    #point::after {
      content: "\2212";
    }
  </style>
</head>
<body>
  <p>Using Named Entity: &minus;</p>
  <p>Using Hex Code: &#x2212;</p>
  <p>Using HTML Code: &#8722;</p>
  <p id="point">Using CSS Entity: </p>
  <p>Equation: 10 &minus; 3 = 7</p>
</body>
</html>
Try It Yourself

How It Works

1. Named: &minus; is the clearest HTML form and renders −.

2. Hex: U+2212 → &#x2212; in HTML. Same result as the named entity.

3. Decimal: same code point as 8722 → &#8722;. Same result as hex and named.

4. CSS: use \2212 in content (not an HTML entity). #point::after appends that − after the paragraph text.

Pitfalls & Tips

Common mistakes when working with the minus sign.

Prefer

Use &minus; for math

The named entity is clearer than numeric forms and matches mathematical typography.

Not -

Not the keyboard hyphen

ASCII - (U+002D) is for words and code. Math subtraction should use &minus;.

Ranges

Not for page ranges

Write 10–20 with &ndash;, not with the minus sign.

CSS vs HTML

Do not mix escapes

\2212 belongs in CSS. &minus; / &#x2212; / &#8722; belong in HTML.

Encoding

Declare UTF-8

If you type − directly, keep <meta charset="UTF-8"> so the file is not misread.

Semicolon

End references

Always finish with ; — write &minus;, not &minus.

Browser Support

Minus sign (U+2212) and its entity forms (&minus;, &#x2212;, &#8722;, CSS \\2212) are supported in all mainstream browsers.

✓ Universal support

Minus (&minus;)

Encode with named, hex, decimal, or CSS escape — or type − directly in UTF-8 HTML.

100% Browser coverage
Google Chrome Supported
Yes
Microsoft Edge Supported
Yes
Mozilla Firefox Supported
Yes
Apple Safari Supported
Yes
Opera Supported
Yes
Internet Explorer IE 9+
Yes*
U+2212 / &minus; Full support

Bottom line: Prefer &minus; in mathematical HTML. Use \\2212 only inside CSS content.

Key Takeaways

  • Unicode: minus is U+2212 (decimal 8722).
  • HTML: prefer &minus; (also &#x2212; / &#8722;).
  • CSS: use \2212 inside content for generated text.
  • Do not confuse: keyboard - is hyphen-minus (U+002D).

One line: U+2212 → prefer &minus; (also &#x2212; / &#8722; / CSS \2212).

Frequently Asked Questions

Use &minus; (named), &#x2212; (hex), &#8722; (decimal), or the CSS escape \2212 in the content property. All render −. Prefer &minus; in mathematical HTML.
U+2212 (MINUS SIGN). Hex 2212, decimal 8722. It belongs to the Mathematical Operators block.
Yes. &minus; is the HTML5 named entity for −.
Use it for mathematical subtraction, negative numbers in math context, and scientific notation. Use the ASCII hyphen - for compound words and code.
HTML entities (&minus;, &#8722;, or &#x2212;) go in markup. The CSS escape \2212 is used in stylesheets (usually in the content property of ::before/::after). Both render −.
No. &minus; is − (U+2212), the mathematical minus. The keyboard key produces - (U+002D, HYPHEN-MINUS), which is shorter and meant for text/code.

Did you know?

Minus sign is Unicode U+2212 (decimal 8722) — in Mathematical Operators. HTML5 provides &minus;. Prefer it in math (10 − 3). The keyboard hyphen - is a different character (U+002D) used for words and code.

Next: Minus Plus

Continue with the minus-plus (∓) entity tutorial.

Minus-plus tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

8 people found this page helpful