HTML Entity for Set Minus (∖)

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

What Is the Set Minus Entity?

Set Minus (∖) is the Mathematical Operators character at Unicode U+2216 (SET MINUS). HTML5 names it ∖. It denotes set difference (elements in A that are not in B).

Remember
Character     ∖
Unicode       U+2216
Named entity  ∖
Hex entity    ∖
Decimal       ∖
CSS escape    \2216
Not the same  − (−) · \ (ASCII backslash)

Named, hex, decimal, CSS, and a typed character all produce the same glyph: ∖. Prefer ∖ in math markup. For arithmetic subtraction use −; do not substitute ASCII backslash when you need U+2216.

Quick Reference

One table for every form you will actually use.

FormCodeWhere it goes
Named entity∖HTML markup (best default)
Hex entity∖HTML markup
Decimal entity∖HTML markup
CSS escape\2216Stylesheet content
Direct character∖UTF-8 HTML text

When to Use Which

SituationUse
Set difference (A ∖ B)∖ (preferred)
Numeric-only markup∖ or ∖
Generated text via ::before / ::aftercontent: "\2216"
Arithmetic subtractionUse − (U+2212)
ASCII backslashUse U+005C only when you mean backslash

Live Preview

Set Minus in set-theory notation, compared with arithmetic minus.

Set difference A ∖ B
Large glyph ∖
Named entity ∖ → ∖
vs minus / hyphen ∖  |  −  |  -
With entities Named: ∖ | Hex: ∖ | Decimal: ∖

Complete HTML Example

One page that shows Set Minus with named, hex, decimal, CSS escape, and a typed character. Use View Output or open the live editor.

Named + Hex + Decimal + CSS + Typed

Five ways to display ∖ in HTML and CSS.

html
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Set Minus (∖)</title>
  <style>
    #point::after {
      content: "\2216";
    }
  </style>
</head>
<body>
  <p>Built with Named: &setminus;</p>
  <p>Built with Hex: &#x2216;</p>
  <p>Built with Decimal: &#8726;</p>
  <p id="point">Built with CSS: </p>
  <p>Typed: ∖</p>
  <p>Set difference: A &setminus; B</p>
</body>
</html>
Try It Yourself

How It Works

1. Named: &setminus; is the preferred HTML5 name for U+2216 → ∖.

2. Hex: &#x2216; inserts the same code point. Same visual as named.

3. Decimal: same code point as 8726 → &#8726;.

4. CSS: use \2216 in content (not an HTML entity). #point::after appends ∖.

5. Typed: paste ∖ in a UTF-8 document, or write A &setminus; B.

Pitfalls & Tips

Common mistakes when working with Set Minus.

Named

Prefer &setminus;

&setminus; is the clear HTML5 named form (alias &ssetmn;). It is case-sensitive.

Look-alikes

∖ ≠ − ≠ \

U+2216 is set minus. &minus; is arithmetic. ASCII \ is a different code point — not a substitute for math set difference.

Meaning

Set difference only

Use ∖ for A ∖ B. Use &minus; when you mean 5 − 2.

Fonts

Glyph coverage

Most math-capable fonts include U+2216. Still test body fonts — some omit Mathematical Operators.

CSS vs HTML

Do not mix escapes

\2216 belongs in CSS. &setminus; / &#x2216; / &#8726; belong in HTML.

Semicolon

End references

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

Browser Support

Set Minus (U+2216) and its entity forms (&setminus;, &#x2216;, &#8726;, CSS \\2216) are supported in all modern browsers. Glyph coverage depends on the font.

✓ Universal encoding

Set 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+2216 / &setminus; Full support

Bottom line: Prefer &setminus; in HTML. Use &#x2216; / &#8726; when numeric form is required, and \\2216 only inside CSS content.

Key Takeaways

  • Unicode: this symbol is U+2216 (decimal 8726) — set difference.
  • HTML: prefer &setminus; (or &#x2216; / &#8726;).
  • CSS: use \2216 inside content for generated text.
  • Watch out: not the same as &minus; (−) or ASCII backslash.

One line: U+2216 → &setminus; / &#x2216; / CSS \2216.

Frequently Asked Questions

Use &setminus; (named), &#x2216; (hex), &#8726; (decimal), or the CSS escape \2216 in the content property. All render ∖. Prefer &setminus; for readable math markup.
U+2216 (SET MINUS). Hex 2216, decimal 8726, named entity &setminus;. It belongs to Mathematical Operators (U+2200–U+22FF).
Yes. HTML5 defines &setminus; for U+2216 (also &ssetmn;). It is case-sensitive — write &setminus;, not &SETMINUS;.
Use it for set difference in set theory and math notes (A ∖ B). Prefer &minus; for arithmetic subtraction and a typed backslash only when ASCII is intentional.
HTML entities (&setminus;, &#8726;, or &#x2216;) go in markup. The CSS escape \2216 is used in stylesheets (usually in the content property of ::before/::after). Both render ∖.
U+2216 is SET MINUS (set difference). U+2212 is MINUS SIGN (&minus;) for arithmetic. Same family of shapes, different meanings.

Did you know?

Set Minus is Unicode U+2216 (decimal 8726) — SET MINUS for set difference (e.g. A ∖ B). HTML5 names it &setminus; (case-sensitive; alias &ssetmn;). Do not confuse it with arithmetic minus (&minus;, U+2212) or ASCII backslash.

Next: Shadowed White Circle

Learn the HTML entity for Shadowed White Circle — next in this sequence.

Continue tutorial →

CODETOFUN NEWS

Stay Ahead in Tech

Get the latest IT news, programming updates, and technology trends directly on your phone.

Your daily dose of tech, straight to your feed.

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