HTML Entity for Ring (∘)

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

What You'll Learn

How to display the Ring symbol (∘) in HTML using the named entity, hexadecimal, decimal, and CSS escape methods. This symbol is U+2218 (RING OPERATOR) in the Mathematical Operators block (U+2200–U+22FF)—the standard notation for function composition (e.g. fg).

Render it with ∘ (named), ∘, ∘, or CSS \2218. Do not confuse ∘ with U+00B0 (°, degree sign) or U+25CB (○, white circle / ˆ).

⚡ Quick Reference — Ring Entity

Unicode U+2218

Mathematical Operators

Hex Code ∘

Hexadecimal reference

HTML Code ∘

Decimal reference

Named Entity ∘

Most readable option

Reference Table
Name           Value
────────────   ──────────
Unicode        U+2218
Hex code       ∘
HTML code      ∘
Named entity   ∘
CSS code       \2218
Meaning        Ring operator / function composition
Related        U+00B0 = degree sign (°)
               U+25CB = white circle (○ / ˆ)
               U+22BB = XOR (⊻ / ⊻)
1

Complete HTML Example

A simple example showing the Ring symbol (∘) using the named entity, hexadecimal code, decimal HTML code, and a CSS content escape:

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

🌐 Browser Support

The Ring symbol (∘) is universally supported in all modern browsers when the font includes Mathematical Operators glyphs:

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

👀 Live Preview

See the Ring symbol (∘) rendered live in different contexts:

Function composition (fg)(x) = f(g(x))
Large glyph
Inline formula h = fgk
Symbol comparison ∘ ° ○
Numeric refs &compfn; &#x2218; &#8728; \2218
Set notation Use ∘ for composition in algebra and set-theory docs.

🧠 How It Works

1

Named Entity

&compfn; is the semantic named entity for U+2218—the easiest to read in source HTML for function composition.

HTML markup
2

Hexadecimal Code

&#x2218; uses the Unicode hexadecimal value 2218. The x prefix indicates hexadecimal format.

HTML markup
3

Decimal HTML Code

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

HTML markup
4

CSS Entity

\2218 is used in CSS stylesheets in the content property of pseudo-elements like ::after.

CSS stylesheet
=

Same visual result

All four methods produce . Unicode U+2218 sits in the Mathematical Operators block. Previous: Right White Arrow From Wall (U+21F0).

Use Cases

The Ring symbol (∘) is commonly used in:

∑ Mathematical Equations

Represent function composition in formulas and proofs.

𝑥 Function Composition

Write fg for applying g then f.

𝜋 Algebra

Use in algebraic expressions and abstract algebra notation.

📊 Set Theory

Include in set-theoretic and relational composition notation.

📚 Academic Content

Display in textbooks, lecture notes, and math tutorials.

💻 Math Software Docs

Reference in equation editors and CAS documentation.

💡 Best Practices

Do

  • Prefer &compfn; for readable source markup
  • Distinguish ∘ from ° (degree) and ○ (white circle)
  • Add aria-label for standalone symbols in UI
  • Test the glyph across browsers and math fonts
  • Pair ∘ with plain text on first use (e.g. “composition”)

Don’t

  • Confuse ∘ (ring operator) with ° (degree sign)
  • Use CSS escape \2218 inside HTML text nodes
  • Use HTML entities in JS (use \u2218 instead)
  • Mix entity styles randomly in one file
  • Assume all fonts render ∘ at the same size as text

Key Takeaways

1

Four methods all render ∘

&compfn; &#x2218; &#8728;
2

For CSS, use \2218 in the content property

3

Unicode U+2218 — RING OPERATOR (function composition)

4

Prefer &compfn; for readability—it’s the named HTML entity

❓ Frequently Asked Questions

Use &compfn; (named), &#x2218; (hex), &#8728; (decimal), or \2218 in CSS content. All four methods render ∘ correctly.
U+2218 (RING OPERATOR). Mathematical Operators block (U+2200–U+22FF). Hex 2218, decimal 8728. Denotes function composition.
In mathematical equations, function composition (e.g. fg), algebra, set theory, and formal mathematical notation.
HTML entities (&#8728;, &#x2218;, or &compfn;) go directly in markup. The CSS escape \2218 is used in stylesheets, typically in the content property of ::before or ::after. Same visual result, different layers of the stack.
Yes. &compfn;, &#8728;, and &#x2218; are equivalent in modern browsers and all render ∘.

Explore More HTML Entities!

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