HTML Entity for Not Equal To (≠)

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

What Is the Not Equal To Entity?

Not equal to (≠) is the Mathematical Operators character at Unicode U+2260 (NOT EQUAL TO). It states that two values are not equal — for example x ≠ y.

Remember
Character     ≠
Unicode       U+2260
Named entity  ≠  (also ≠)
Hex entity    ≠
Decimal       ≠
CSS escape    \2260
Affirmative   = / = (U+003D)

Named, hex, decimal, CSS, and a typed character all produce the same glyph: ≠. Prefer ≠ in HTML source for clarity.

Quick Reference

One table for every form you will actually use.

FormCodeWhere it goes
Named entity≠HTML markup (also ≠)
Hex entity≠HTML markup
Decimal entity≠HTML markup
CSS escape\2260Stylesheet content
Direct character≠UTF-8 HTML text

When to Use Which

SituationUse
Readable HTML source≠
Numeric entity required≠ or ≠
Generated text via ::before / ::aftercontent: "\2260"
Equals == or type = — see Equal To
Not identical ≢≢

Live Preview

Not equal to in comparison contexts.

Relation x ≠ y
Large glyph ≠
Named entity ≠ → ≠
vs = / ≢ ≠  |  =  |  ≢
With entities Named: ≠ | Hex: ≠ | Decimal: ≠

Complete HTML Example

One page that shows this symbol 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>Not Equal To (&ne;)</title>
  <style>
    #point::after {
      content: "\2260";
    }
  </style>
</head>
<body>
  <p>Using Named Entity: &ne;</p>
  <p>Using Hex Code: &#x2260;</p>
  <p>Using HTML Code: &#8800;</p>
  <p id="point">Using CSS Entity: </p>
  <p>Example: 3 + 2 &ne; 4</p>
</body>
</html>
Try It Yourself

How It Works

1. Named: &ne; (or &NotEqual;) is the clearest HTML form and renders ≠.

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

3. Decimal: same code point as 8800 → &#8800;. Same result as hex.

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

Pitfalls & Tips

Common mistakes when working with the not-equal-to entity.

ASCII

!= is not &ne;

In code, != is two ASCII characters. For the math glyph ≠ in HTML prose, use &ne;.

Look-alikes

Not &nequiv; or &napprox;

&nequiv; is ≢ (not identical). &napprox; is ≉ (not almost equal). Pick the operator that matches your meaning.

Aliases

&ne; = &NotEqual;

Both map to U+2260. Prefer the short &ne; in everyday HTML.

CSS vs HTML

Do not mix escapes

\2260 belongs in CSS. &ne; / &#x2260; / &#8800; belong in HTML.

Encoding

Declare UTF-8

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

Semicolon

End references

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

Browser Support

Not equal to (U+2260) and its entity forms (&ne;, &#x2260;, &#8800;, CSS \\2260) are supported in all modern browsers. Glyph availability depends on the font.

✓ Universal encoding

Not Equal To (≠)

Encode with named, hex, decimal, or CSS escape — or paste ≠ 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 All versions
Yes
U+2260 Full support

Bottom line: Prefer &ne; for readable HTML. Use \\2260 only inside CSS content.

Key Takeaways

  • Unicode: this character is U+2260 (decimal 8800).
  • HTML: prefer &ne; (alias &NotEqual;) — or use &#x2260; / &#8800;.
  • CSS: use \2260 inside content for generated text.
  • Watch out: &ne; ≠ != ≠ &nequiv;.

One line: U+2260 → &ne; / &#x2260; / &#8800; / CSS \2260.

Frequently Asked Questions

Use &ne; (named), &#x2260; (hex), &#8800; (decimal), type ≠ in UTF-8, or the CSS escape \2260 in content. All render ≠. Prefer &ne; in HTML source.
U+2260 (NOT EQUAL TO). Hex 2260, decimal 8800. It belongs to the Mathematical Operators block (U+2200–U+22FF).
Yes. HTML5 defines &ne; and &NotEqual; (aliases for the same character). Related: &equals; for the equals sign (=).
Use it for strict inequality (e.g. x ≠ y). Prefer &ne; for readable source. For approximate inequality use &napprox; (≉). For not identical use &nequiv; (≢).
HTML entities (&ne;, &#8800;, or &#x2260;) go in markup. The CSS escape \2260 is used in stylesheets (usually in the content property of ::before/::after). Both render ≠.
In programming, != is two ASCII characters. ≢ (U+2262, &nequiv;) means not identical / not equivalent under ≡. ≠ (&ne;) is the dedicated not-equal math symbol — do not confuse them.

Did you know?

Not equal to (≠) is Unicode U+2260 (decimal 8800) — NOT EQUAL TO in Mathematical Operators. HTML5 provides &ne; and &NotEqual; (same glyph). It is the classic inequality operator. Related: &equals; (=) and &nequiv; (≢, not identical).

Next: Not Equivalent To

Learn the HTML entity for ≭ / U+226D — 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