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.
Reference
Quick Reference
One table for every form you will actually use.
Form
Code
Where it goes
Named entity
∞
HTML markup (best default)
Hex entity
∞
HTML markup
Decimal entity
∞
HTML markup
CSS escape
\221E
Stylesheet content
Direct character
∞
UTF-8 HTML text
When to Use Which
Situation
Use
Readable math HTML source
∞
Need a numeric entity in HTML
∞ or ∞
Generated text via ::before / ::after
content: "\221E"
UTF-8 page, typing is easy
Type ∞ directly
JavaScript numeric infinity
Use Infinity in code — not the HTML entity
See it
Live Preview
Infinity rendered in common math contexts.
Limitlimx→∞ f(x)
Large glyph∞
Set size|ℕ| = ∞
Named entity∞ → ∞
With entitiesHex: ∞ | Decimal: ∞ | Named: ∞
Code
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: ∞</p>
<p>Infinity using HTML Code: ∞</p>
<p>Infinity using Named Entity: ∞</p>
<p id="point">Infinity using CSS Entity: </p>
</body>
</html>
Use ∞ (named), ∞ (hex), ∞ (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. ∞ 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 ∞ for readable source, or numeric forms when generating markup.
HTML entities (∞, ∞, or ∞) 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 ∞ — prefer it for readable math markup, or use ∞ / ∞.