HTML Entity for Not Equal To (≠)

Beginner
⏱️ 5 min read
📚 Updated: Jun 2026
🎯 1 Code Example
Unicode U+2260

What You'll Learn

How to display the Not Equal To symbol (≠) in HTML using named, hexadecimal, decimal, and CSS escape methods. This comparison operator states that two values are not equal (e.g. ab).

This character is U+2260 (NOT EQUAL TO) in the Mathematical Operators block (U+2200–U+22FF). Render it with the named entity ≠, ≠, ≠, or CSS escape \2260. Compare with the ordinary equals sign in Equal To (=, U+003D) and Almost Equal To (≈, ≈).

⚡ Quick Reference — Not Equal To

Unicode U+2260

Mathematical Operators

Hex Code ≠

Hexadecimal reference

HTML Code ≠

Decimal reference

Named Entity ≠

HTML5 named entity for U+2260

Reference Table
Name           Value
────────────   ──────────
Unicode        U+2260
Hex code       ≠
HTML code      ≠
Named entity   ≠
CSS code       \2260
Meaning        Not equal to
Related        U+003D = equal (=, =)
               U+2248 = almost equal (≈, ≈)
               U+2209 = not element of (∉, ∉)
Block          Mathematical Operators (U+2200–U+22FF)
1

Complete HTML Example

A simple example showing ≠ using hexadecimal code, decimal HTML code, the named entity, and a CSS content escape:

html
<!DOCTYPE html>
<html>
<head>
 <style>
  #point::after{
   content: "\2260";
  }
 </style>
</head>
<body>
<p>Symbol (hex): &#x2260;</p>
<p>Symbol (decimal): &#8800;</p>
<p>Symbol (named): &ne;</p>
<p id="point">Symbol (CSS): </p>
</body>
</html>
Try it Yourself

🌐 Browser Support

U+2260 is widely supported wherever Unicode Mathematical Operators render correctly:

Chrome1+
Firefox1+
Safari1+
Edge12+
Opera4+
Android4.4+
iOS Safari1+

👀 Live Preview

See ≠ in comparison and mathematical contexts:

Comparison 3 + 2 ≠ 4
Large glyph
Equality family = equal   ≠ not equal   ≈ almost equal
Programming docs xy → values differ
Entity refs &ne; &#x2260; &#8800; \2260

🧠 How It Works

1

Named Entity

&ne; is the HTML named entity for U+2260—the most readable choice when writing comparison markup.

HTML markup
2

Hexadecimal Code

&#x2260; uses the Unicode hexadecimal value 2260 to display the not-equal symbol.

HTML markup
3

Decimal HTML Code

&#8800; uses the decimal Unicode value 8800 to display the same character.

HTML markup
4

CSS Entity

\2260 is used in CSS stylesheets, particularly in the content property of pseudo-elements like ::before and ::after.

CSS stylesheet
=

Same visual result

All four methods produce: . Unicode U+2260 in Mathematical Operators (U+2200–U+22FF).

Use Cases

The ≠ symbol (&ne;) is commonly used in:

📐 Mathematics

Expressing inequality between numbers, variables, or expressions.

💻 Programming docs

Explaining comparison operators and inequality in tutorials.

📚 Academia

Textbooks, papers, and lecture notes published as HTML.

⚙ Science & engineering

Formulas and specifications where values must differ.

🎓 Online courses

Interactive math and CS modules with web-based notation.

🌐 Reference guides

Unicode charts and HTML entity documentation for math symbols.

💡 Best Practices

Do

  • Use &ne; for readable inequality markup
  • Distinguish ≠ from = (equal) and ≈ (almost equal)
  • Pair ≠ with plain-language description on first use
  • Use numeric references in generated or XML-first workflows
  • Serve pages with UTF-8 (<meta charset="utf-8">)

Don’t

  • Confuse ≠ with ∉ (not element of) or ≉ (not almost equal)
  • Use the ASCII slash-equals combo <> when you mean the math symbol ≠
  • Use padded Unicode notation like U+02260—the correct value is U+2260
  • Put CSS escape \2260 in HTML text nodes
  • Use \02260 in CSS—the correct escape is \2260

Key Takeaways

1

Three HTML references plus CSS all render ≠

&#x2260; &#8800; &ne;
2

For CSS stylesheets, use the escape in the content property

\2260
3

Unicode U+2260 — NOT EQUAL TO

4

Mathematical Operators block (U+2200–U+22FF)

5

&ne; is the preferred named entity for readable source markup

❓ Frequently Asked Questions

Use &ne; (named), &#x2260; (hex), &#8800; (decimal), or \2260 in CSS content. All produce ≠.
U+2260 (NOT EQUAL TO). Mathematical Operators block (U+2200–U+22FF). Hex 2260, decimal 8800. Named entity: &ne;.
Use ≠ for strict inequality—when two values are definitively not equal. Use = for equality and ≈ (&asymp;) when values are approximately equal.
HTML references (&#8800;, &#x2260;, or &ne;) go directly in markup. The CSS escape \2260 is used in stylesheets, typically in the content property of pseudo-elements. Same visual result, different layers of the stack.
Yes. &ne; is the named HTML entity for U+2260 and is the most readable option in source markup.

Explore More HTML Entities!

Discover 1500+ HTML character references — arrows, symbols, and more.

All HTML Entities →

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