HTML Entity for Infinity (∞)

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

What You'll Learn

How to display the Infinity symbol (∞) in HTML using hexadecimal, decimal, named entity, and CSS escape methods. Use it for unbounded quantities—limits (as x → ∞), infinite series, set theory, and calculus.

This character is U+221E (INFINITY) in the Mathematical Operators block (U+2200–U+22FF). Render it with ∞, ∞, ∞, or CSS \221E.

⚡ Quick Reference — Infinity

Unicode U+221E

Mathematical Operators block

Hex Code ∞

Hexadecimal reference

HTML Code ∞

Decimal reference

Named Entity ∞

Most readable option

Reference Table
Name           Value
────────────   ──────────
Unicode        U+221E
Hex code       ∞
HTML code      ∞
Named entity   ∞
CSS code       \221E
Meaning        Infinity / unbounded quantity
CSS note       \221E or \0221E in content property
1

Complete HTML Example

This example demonstrates the Infinity symbol (∞) using hexadecimal code, decimal HTML code, the named entity, and a CSS content escape:

html
<!DOCTYPE html>
<html>
<head>
 <style>
  #point:after{
   content: "\221E";
  }
 </style>
</head>
<body>
<p>Infinity using Hexadecimal: &#x221E;</p>
<p>Infinity using Decimal: &#8734;</p>
<p>Infinity using Named Entity: &infin;</p>
<p id="point">Infinity using CSS Entity: </p>
</body>
</html>
Try it Yourself

🌐 Browser Support

The Infinity symbol (∞) is universally supported in all modern browsers:

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

👀 Live Preview

See the Infinity symbol rendered live in different contexts:

Large glyph
Named entity &infin; renders as ∞
Limits limx→∞ f(x)
Set theory |ℕ| = ∞
Numeric refs &#x221E; &#8734; &infin; \221E

🧠 How It Works

1

Hexadecimal Code

&#x221E; uses the Unicode hexadecimal value 221E to display the Infinity symbol. The x prefix indicates hexadecimal format.

HTML markup
2

Decimal HTML Code

&#8734; uses the decimal Unicode value 8734 to display the same character. This is one of the most commonly used methods.

HTML markup
3

CSS Entity

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

CSS stylesheet
4

Named Entity

&infin; is the named entity for ∞—easy to remember and clear in source HTML.

HTML markup
=

Same visual result

All four methods produce the glyph: . Unicode U+221E is in Mathematical Operators. Next: Information Source.

Use Cases

The Infinity symbol (∞) commonly appears in the following scenarios:

∑ Limits & calculus

Limits at infinity (limx→∞), improper integrals, and infinite series.

📐 Set theory

Infinite sets, cardinality (e.g. |ℕ| = ∞), and countability.

⚛ Physics

Unbounded domains, asymptotic behavior, and infinite systems in formulas.

💻 Programming

Document floating-point Infinity (e.g. JavaScript) in API docs and tutorials.

🎓 Education

Calculus, analysis, and philosophy-of-math course materials.

🔬 Science

Papers on unbounded growth, limits, or infinite processes.

💡 Best Practices

Do

  • Prefer &infin; for readable source markup
  • Keep one method (named, hex, or decimal) consistent per document
  • Use semantic HTML and aria-label for standalone math symbols when needed
  • Provide context (e.g. “as x → ∞” or “infinite set”) in mixed content
  • Test rendering across browsers and fonts

Don’t

  • Put CSS escape \221E in HTML text nodes
  • Confuse ∞ (infinity) with ♯ (music sharp) or other similar-looking glyphs
  • Mix entity styles randomly in one file
  • Assume every font renders U+221E clearly
  • Skip UTF-8 (<meta charset="utf-8">) on math-heavy pages

Key Takeaways

1

Four methods all render ∞

&#x221E; &#8734; &infin;
2

For CSS stylesheets, use the escape in the content property

\221E
3

Unicode U+221E belongs to the Mathematical Operators block (U+2200–U+22FF)

4

Prefer &infin; for readability in HTML source

❓ Frequently Asked Questions

Use &#x221E; (hex), &#8734; (decimal), &infin; (named), or \221E in CSS content. All produce ∞.
U+221E (INFINITY). Mathematical Operators block (U+2200–U+22FF). Hex 221E, decimal 8734. Named entity: &infin;. Used for limits, infinite sets, and unbounded quantities.
In mathematics (limits, calculus, infinite series), physics and engineering, set theory, programming documentation, and scientific or educational content requiring infinity notation.
HTML entities (&infin;, &#8734;, or &#x221E;) go in markup. The CSS escape \221E belongs in stylesheets, typically in the content property of pseudo-elements. Both render ∞.
Yes. &infin; is the named HTML entity for ∞ (infinity). It is part of the HTML5 entity set and is well supported in modern browsers.

Explore More HTML Entities!

Discover 1500+ HTML character references — currency symbols, arrows, math operators, emojis, 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