HTML Entity for Infinity (∞)

Beginner
6 min read
Updated: Sep 2026
1 example
Unicode U+221E

What Is the Infinity Entity?

Infinity (∞) is the Mathematical Operators character at Unicode U+221E (INFINITY). Use it for unbounded quantities — limits (as x → ∞), infinite sets, and calculus.

Remember
Character     ∞
Unicode       U+221E
Hex entity    ∞
Decimal       ∞
Named entity  ∞
CSS escape    \221E

All of these produce the same glyph: ∞. Prefer ∞ in HTML source for clarity; use hex/decimal when generating entities, and CSS \221E only in content.

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\221EStylesheet content
Direct character∞UTF-8 HTML text

When to Use Which

SituationUse
Readable math HTML source∞
Need a numeric entity in HTML∞ or ∞
Generated text via ::before / ::aftercontent: "\221E"
UTF-8 page, typing is easyType ∞ directly
JavaScript numeric infinityUse Infinity in code — not the HTML entity

Live Preview

Infinity rendered in common math contexts.

Limit limx→∞ f(x)
Large glyph ∞
Set size |ℕ| = ∞
Named entity ∞ → ∞
With entities Hex: ∞ | Decimal: ∞ | Named: ∞

Complete HTML Example

One page that shows Infinity with the hex entity, decimal entity, named entity, and CSS escape. Use View Output or open the live editor.

Hex + Decimal + Named + CSS

All four ways to produce ∞ in a single document.

html
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Infinity (∞) in HTML</title>
  <style>
    #point::after {
      content: "\221E";
    }
  </style>
</head>
<body>
  <p>Infinity using Hex Code: &#x221E;</p>
  <p>Infinity using HTML Code: &#8734;</p>
  <p>Infinity using Named Entity: &infin;</p>
  <p id="point">Infinity using CSS Entity: </p>
</body>
</html>
Try It Yourself

How It Works

1. Hex: U+221E → &#x221E; in HTML. The browser turns it into ∞.

2. Decimal: same code point as 8734 → &#8734;. Same result as hex.

3. Named: &infin; is the HTML5 name for this character — easiest to read in source.

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

Pitfalls & Tips

Common mistakes when working with the Infinity symbol.

Named

Prefer &infin;

Named form is clearer than numeric codes in hand-written HTML.

CSS vs HTML

Do not mix escapes

\221E belongs in CSS. &infin; / &#x221E; / &#8734; belong in HTML.

Display vs code

Not JS Infinity

∞ is for page text. In JavaScript use the numeric value Infinity.

Default

Type ∞ when you can

On UTF-8 pages you may type ∞ directly; entities help when encoding must be explicit.

Semicolon

End references

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

Fonts

Math Operators support

Use fonts that include U+221E (most modern UI fonts do) so the glyph is not missing.

Browser Support

Infinity (U+221E) and its entity forms (&infin;, &#x221E;, &#8734;, CSS \\221E) are supported in all mainstream browsers.

✓ Universal support

Infinity (∞)

Use &infin;, or encode with hex, decimal, or CSS escape — same glyph everywhere.

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+221E / entities Full support

Bottom line: Prefer &infin; in HTML for readability. Use &#x221E; or &#8734; when encoding must be numeric, and \\221E only inside CSS content.

Key Takeaways

  • Unicode: Infinity is U+221E (decimal 8734).
  • HTML: prefer &infin;, or use &#x221E; / &#8734;.
  • CSS: use \221E inside content for generated text.
  • Use case: limits, infinite sets, and unbounded quantities in math text.

One line: U+221E → &infin; / &#x221E; / &#8734; / CSS \221E.

Frequently Asked Questions

Use &infin; (named), &#x221E; (hex), &#8734; (decimal), or the CSS escape \221E in the content property. All render the Infinity symbol (∞).
U+221E (INFINITY). Hex 221E, decimal 8734. It belongs to the Mathematical Operators block.
Yes. &infin; is the named HTML5 entity for ∞ and is supported in all modern browsers.
Use it for limits (x → ∞), infinite sets, calculus, physics, and docs about unbounded values. Prefer &infin; for readable source, or numeric forms when generating markup.
HTML entities (&infin;, &#8734;, or &#x221E;) go in markup. The CSS escape \221E is used in stylesheets (usually in the content property of ::before/::after). Both render ∞.
No. ∞ is a Unicode math character for display. In JavaScript, Infinity is a numeric value (Number.POSITIVE_INFINITY) — unrelated to the HTML entity.

Did you know?

Infinity is Unicode U+221E (decimal 8734). HTML5 provides the named entity &infin; — prefer it for readable math markup, or use &#x221E; / &#8734;.

Next: Information Source

Learn the HTML entity for the Information Source symbol (ℹ) — next in this entity sequence.

Information Source tutorial →

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