HTML Entity for Ring (∘)

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

What Is the Ring Entity?

Ring (∘) is the Mathematical Operators character at Unicode U+2218 (RING OPERATOR). It is the standard symbol for function composition (for example f ∘ g).

Remember
Character     ∘
Unicode       U+2218
Hex entity    ∘
Decimal       ∘
Named entity  ∘
CSS escape    \2218
Not the same  ° (°) · ○ (○)

All of these produce the same glyph: ∘. Prefer ∘ when you want an explicit entity.

Quick Reference

One table for every form you will actually use.

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

When to Use Which

SituationUse
Readable HTML entity source∘
Need a numeric entity∘ or ∘
Generated text via ::before / ::aftercontent: "\2218"
Temperature / angles (degrees)Use ° (U+00B0)
Diacritic ring above a letterUse U+030A (combining) or ˚ (spacing)

Live Preview

Ring operator in common math and label contexts.

Composition f ∘ g
Large glyph ∘
Named entity ∘ → ∘
vs ° / ○ ∘  |  °  |  ○
With entities Hex: ∘ | Decimal: ∘ | Named: ∘

Complete HTML Example

One page that shows this symbol with hex, decimal, named, and CSS. 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>Ring (∘)</title>
  <style>
    #point::after {
      content: "\2218";
    }
  </style>
</head>
<body>
  <p>Using Hex Code: &#x2218;</p>
  <p>Using HTML Code: &#8728;</p>
  <p>Using Named Entity: &compfn;</p>
  <p id="point">Using CSS Entity: </p>
  <p><code>f &compfn; g</code></p>
</body>
</html>
Try It Yourself

How It Works

1. Hex: U+2218 → &#x2218; in HTML. The browser turns it into ∘.

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

3. Named: &compfn; is the HTML5 name for this character (composition function).

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

Pitfalls & Tips

Common mistakes when working with Ring.

Look-alikes

∘ ≠ ° ≠ ○

&compfn; is math composition. &deg; is degrees. &cir; is a white circle — pick the meaning you need.

Name

&compfn; ≠ &ring;

&ring; is the spacing ring above (U+02DA). The ring operator’s named entity is &compfn;.

Fonts

Math glyph coverage

Most modern fonts include U+2218. If it looks like a tiny circle, confirm you did not use &deg; or &cir; by mistake.

CSS vs HTML

Do not mix escapes

\2218 belongs in CSS. &compfn; / &#x2218; / &#8728; belong in HTML.

A11y

Add nearby words

In prose, prefer f &compfn; g with letter labels, or use MathML / aria-label for standalone operators.

Semicolon

End references

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

Browser Support

Ring (U+2218) and its entity forms (&compfn;, &#x2218;, &#8728;, CSS \\2218) are supported in all modern browsers. Glyph coverage depends on the font.

✓ Universal encoding

Ring (&compfn;)

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+2218 / &compfn; Full support

Bottom line: Prefer &compfn; for readable HTML. Use \\2218 only inside CSS content.

Key Takeaways

  • Unicode: this symbol is U+2218 (decimal 8728).
  • HTML: prefer &compfn; — or use &#x2218; / &#8728;.
  • CSS: use \2218 inside content for generated text.
  • Watch out: &compfn; ≠ &deg; ≠ &cir; ≠ &ring;.

One line: U+2218 → &compfn; / &#x2218; / &#8728; / CSS \2218.

Frequently Asked Questions

Use &compfn; (named), &#x2218; (hex), &#8728; (decimal), or the CSS escape \2218 in the content property. You can also type ∘ directly in UTF-8 HTML.
U+2218 (RING OPERATOR). Hex 2218, decimal 8728. It belongs to the Mathematical Operators block (U+2200–U+22FF).
Yes. &compfn; is the HTML5 named entity (short for composition function). You can also use &#x2218; or &#8728;.
Use it for function composition (f ∘ g), algebra, and math notation when you need the ring operator. Prefer &compfn; for readable HTML.
HTML entities (&compfn;, &#8728;, or &#x2218;) go in markup. The CSS escape \2218 is used in stylesheets (usually in the content property of ::before/::after). Both render ∘.
&deg; (U+00B0) is the degree sign. &cir; (U+25CB) is a white circle glyph. &compfn; (U+2218) is the mathematical ring operator used for composition — different code points and meanings.

Did you know?

Ring (ring operator) is Unicode U+2218 (decimal 8728) — RING OPERATOR. HTML5 provides &compfn;. Prefer it for readable source. Do not confuse it with the degree sign &deg; (U+00B0), white circle &cir; (U+25CB), or spacing ring above &ring; (U+02DA).

Next: Ring Above

Learn the HTML entity for Ring Above — next in this sequence.

Continue 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