HTML Entity for Less Than Or Greater Than (≶)

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

What You'll Learn

How to display the Less Than Or Greater Than (≶) symbol in HTML using hexadecimal, decimal, named entity, and CSS escape methods. This character is U+2276 (LESS-THAN OR GREATER-THAN) in the Mathematical Operators block (U+2200–U+22FF).

Render it with ≶, ≶, ≶, or CSS escape \2276. It denotes that one value is less than or greater than another (typically not equal)—used in mathematics, logic, and technical documentation. Related mirror: Greater Than Or Less Than (≷, U+2277) has no named entity.

⚡ Quick Reference — Less Than Or Greater Than

Unicode U+2276

Mathematical Operators

Hex Code ≶

Hexadecimal reference

HTML Code ≶

Decimal reference

Named Entity ≶

Most readable option

Reference Table
Name           Value
────────────   ──────────
Unicode        U+2276
Hex code       ≶
HTML code      ≶
Named entity   ≶
CSS code       \2276
Meaning        Less-than or greater-than
Related        U+2277 = greater-than or less-than (≷)
               ≠ = not equal (≠)
1

Complete HTML Example

A simple example showing the Less Than Or Greater Than (≶) using hexadecimal code, decimal HTML code, the named entity, and a CSS content escape:

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

🌐 Browser Support

The Less Than Or Greater Than symbol (≶) is supported in modern browsers with a math-capable font:

Chrome 1+
Firefox 1+
Safari 1+
Edge 12+
Opera 4+
Android 4.4+
iOS Safari 1+

👀 Live Preview

See the Less Than Or Greater Than symbol (≶) in comparison contexts:

Large glyph
Named entity &lg; renders as ≶
Relation a ≶ b (less or greater, not equal)
Mirror pair ≶ ≷
Related ≶ vs ≠ vs < >
Numeric refs &#x2276; &#8822; &lg; \2276

🧠 How It Works

1

Hexadecimal Code

&#x2276; uses the Unicode hexadecimal value 2276 to display the symbol. The x prefix indicates hexadecimal format.

HTML markup
2

Decimal HTML Code

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

HTML markup
3

Named Entity

&lg; is the semantic named entity for ≶—readable in source HTML and part of the HTML5 character set.

HTML markup
4

CSS Entity

\2276 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 the glyph: . Unicode U+2276 is in Mathematical Operators. Mirror: Greater Than Or Less Than (U+2277). Previous: Less Than Or Equivalent To.

Use Cases

The Less Than Or Greater Than symbol (≶) is commonly used in:

📐 Mathematics

Express “less than or greater than” (strict inequality) in equations and proofs.

📄 Technical docs

Document comparison operators, ordering, or constraints in software and math docs.

📚 Academic papers

Formal definitions and proofs in mathematics, logic, and computer science.

🔢 Logic & set theory

Comparison relations where equality is excluded in formal notation.

💻 Programming tutorials

Explain comparison operators and “not equal” semantics in educational content.

🌐 Web-based math

Equation renderers, calculators, or math-heavy web applications.

💡 Best Practices

Do

  • Use &lg; for readable source markup
  • Use math fonts (Cambria Math, Noto Sans Math) for reliable rendering
  • Provide context when meaning matters (e.g. “a is less or greater than b”)
  • Distinguish ≶ from &ne; (≠) and from &lt; / &gt;
  • Serve pages with UTF-8 (<meta charset="utf-8">)

Don’t

  • Confuse &lg; with the HTML <lg> tag name in prose
  • Use ≶ when you only need &ne; (not equal)
  • Put CSS escape \2276 in HTML text nodes
  • Rely on the symbol alone for screen reader users
  • Assume every system font renders Mathematical Operators clearly

Key Takeaways

1

Three HTML references plus CSS all render ≶

&#x2276; &#8822; &lg;
2

For CSS stylesheets, use the escape in the content property

\2276
3

Unicode U+2276 — LESS-THAN OR GREATER-THAN

4

Prefer &lg; for readability in HTML source

❓ Frequently Asked Questions

Use &#x2276; (hex), &#8822; (decimal), &lg; (named), or \2276 in CSS content. All produce ≶.
U+2276 (LESS-THAN OR GREATER-THAN). Mathematical Operators block (U+2200–U+22FF). Hex 2276, decimal 8822. Named entity: &lg;.
In mathematics for comparison relations, technical documentation, academic papers, logic and set theory, programming tutorials explaining operators, and any content expressing “less than or greater than” in a formal context.
&lg; is the named HTML entity for ≶. It is part of the HTML5 named character set and the most readable option in source markup.
≠ (&ne;) means not equal. ≶ (&lg;) is a combined less-than-or-greater-than symbol used in formal math notation, often implying inequality without specifying which direction applies.

Explore More HTML Entities!

Discover 1500+ HTML character references — comparisons, operators, 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