HTML Entity for Less Than Or Greater Than (≶)

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

What Is the Less Than Or Greater Than Entity?

Less Than Or Greater Than (≶) is the Mathematical Operators character at Unicode U+2276 (LESS-THAN OR GREATER-THAN). It stacks less-than and greater-than in one relation glyph — without an equal bar.

Remember
Character     ≶
Unicode       U+2276
Named entity  ≶  or  ≶
Hex entity    ≶
Decimal       ≶
CSS escape    \2276
Not the same  ⋚ (⋚) · ≷ (≷) · ≠ (≠)

Prefer ≶ or ≶ in HTML. Alternatives: ≶ or ≶. Add the equal bar with ⋚ when you need less-than equal to or greater-than.

Quick Reference

One table for every form you will actually use.

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

When to Use Which

SituationUse
Readable math in HTML≶ or ≶
Numeric entity required≶ or ≶
Generated text via ::before / ::aftercontent: "\2276"
Greater-than or less-thanUse ≷ (U+2277)
With equal bar (⋚)Use ⋚ (U+22DA)

Live Preview

Less Than Or Greater Than in common comparison contexts.

Relation a ≶ b
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. 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>Less Than Or Greater Than (≶)</title>
  <style>
    #point::after {
      content: "\2276";
    }
  </style>
</head>
<body>
  <p>Using Named: &lg;</p>
  <p>Using Alias: &lessgtr;</p>
  <p>Using Hex Code: &#x2276;</p>
  <p>Using HTML Code: &#8822;</p>
  <p id="point">Using CSS Entity: </p>
  <p><code>a &lg; b</code></p>
</body>
</html>
Try It Yourself

How It Works

1. Named: &lg; and &lessgtr; are HTML5 names for U+2276 → ≶. Prefer these for readable source.

2. Hex: U+2276 → &#x2276; in HTML. Same glyph as named.

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

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

5. Look-alikes: &leg; adds an equal bar; &gl; flips the order to greater-than first.

Pitfalls & Tips

Common mistakes when working with Less Than Or Greater Than.

Look-alikes

&lg; ≠ &leg;

&leg; (U+22DA) includes an equal bar. Use &lg; only when equality is not part of the relation.

Pair

Mirror is &gl;

Greater-than or less-than is U+2277 — use &gl;, not a CSS flip of this glyph.

Not ≠

Different from &ne;

&ne; means not equal. &lg; means less-than or greater-than as a stacked comparison glyph.

Fonts

Math glyph coverage

Most modern fonts include U+2276, but verify on target devices if the symbol is critical.

CSS vs HTML

Do not mix escapes

\2276 belongs in CSS. &lg; / &#x2276; / &#8822; belong in HTML.

A11y

Add nearby words

Pair the glyph with label text (for example a &lg; b) or use aria-label when it stands alone.

Semicolon

End references

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

Browser Support

Less Than Or Greater Than (U+2276) and its entity forms (&lg;, &lessgtr;, &#x2276;, &#8822;, CSS \\2276) are supported in all modern browsers. Glyph coverage depends on the font.

✓ Universal encoding

Less Than Or Greater Than (≶)

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+2276 Full support

Bottom line: Prefer &lg; or &lessgtr; for readable HTML. Use \\2276 only inside CSS content.

Key Takeaways

  • Unicode: this symbol is U+2276 (decimal 8822).
  • HTML: prefer &lg; or &lessgtr; — also &#x2276; / &#8822;.
  • CSS: use \2276 inside content for generated text.
  • Watch out: &lg; ≠ &leg; ≠ &gl;.

One line: U+2276 → &lg; / &lessgtr; / &#x2276; / CSS \2276.

Frequently Asked Questions

Use &lg; or &lessgtr; (named), &#x2276; (hex), &#8822; (decimal), or the CSS escape \2276 in the content property. All render ≶ when the font supports Mathematical Operators.
U+2276 (LESS-THAN OR GREATER-THAN). Hex 2276, decimal 8822. It belongs to Mathematical Operators (U+2200–U+22FF).
Yes. HTML5 defines &lg;, &lessgtr;, and &LessGreater; for U+2276. Prefer &lg; or &lessgtr; for readable math markup.
Use it when a value is either less than or greater than another (not equal) — the stacked </> style relation without an equal bar. Prefer named entities for readable source.
HTML entities (&lg;, &lessgtr;, &#8822;, or &#x2276;) go in markup. The CSS escape \2276 is used in stylesheets (usually in the content property of ::before/::after). Both render ≶.
&lg; (U+2276) is less-than or greater-than without an equal bar. &leg; (U+22DA) adds the equal component. &gl; (U+2277) is the greater-than-first mirror.

Did you know?

Less Than Or Greater Than is Unicode U+2276 (decimal 8822) — LESS-THAN OR GREATER-THAN in Mathematical Operators. HTML5 named entities: &lg; and &lessgtr; (also &LessGreater;). Mirror form: &gl; (U+2277). With an equal bar, use &leg; (U+22DA) instead.

Next: Less Than Over Equal To

Learn the HTML entity for Less Than Over Equal To — 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