HTML Entity for Ratio (∶)

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

What You'll Learn

How to display the ratio symbol (∶) in HTML using various entity methods. The ratio operator represents a mathematical ratio between quantities and is essential for geometry, fractions, proportion problems, and formal mathematical notation.

This character is part of the Mathematical Operators Unicode block and can be rendered with a hexadecimal reference, a decimal reference, the named entity ∶, or a CSS escape in the content property. Do not confuse ∶ with U+2237 (∷, proportion) or an ordinary ASCII colon (:).

⚡ Quick Reference — Ratio Entity

Unicode U+2236

Mathematical Operators block

Hex Code ∶

Hexadecimal reference

HTML Code ∶

Decimal reference

Named Entity ∶

Most readable option

Reference Table
Name           Value
────────────   ──────────
Unicode        U+2236
Hex code       ∶
HTML code      ∶
Named entity   ∶
CSS code       \2236
Meaning        Ratio operator
Related        U+2237 = proportion (∷)
               U+221D = proportional to (∝)
Block          Mathematical Operators (U+2200–U+22FF)
1

Complete HTML Example

A simple example showing ∶ using hexadecimal code, decimal HTML code, the named entity, and a CSS content escape:

html
<!DOCTYPE html>
<html>
<head>
 <style>
  #point::after{
   content: "\2236";
  }
 </style>
</head>
<body>
<p>Ratio (hex): a &#x2236; b</p>
<p>Ratio (decimal): a &#8758; b</p>
<p>Ratio (named): a &ratio; b</p>
<p>Ratio (CSS): a <span id="point"></span> b</p>
</body>
</html>
Try it Yourself

🌐 Browser Support

The ratio entity is universally supported in all modern browsers:

Chrome1+
Firefox1+
Safari1+
Edge12+
Opera4+
Android4.4+
iOS Safari1+

👀 Live Preview

See the ratio symbol rendered live in different contexts:

Inline ratio a ∶ b ∶ c
Large glyph
In a formula 2 ∶ 3 = 4 ∶ 6
Not the same as Colon :  |  Proportion ∷  |  Proportional to ∝
Numeric refs &#x2236; &#8758; &ratio; \2236

🧠 How It Works

1

Hexadecimal Code

&#x2236; uses the Unicode hexadecimal value 2236 to display the ratio symbol. The x prefix indicates hexadecimal format.

HTML markup
2

Decimal HTML Code

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

HTML markup
3

CSS Entity

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

CSS stylesheet
4

Named Entity

&ratio; is the semantic named entity — the easiest to read in source HTML and the most self-descriptive option.

HTML markup
=

Same visual result

All four methods produce the ratio glyph: . Unicode U+2236 sits in the Mathematical Operators block (U+2200–U+22FF).

Use Cases

The ratio symbol (∶) commonly appears in the following scenarios:

📐 Mathematics

Ratio notation in formulas, problems, and step-by-step solutions.

📏 Geometry

Side-length ratios, similar triangles, and scale factor expressions.

📚 Textbooks

Academic content, lesson notes, and online course materials.

📈 Statistics

Odds ratios, rate comparisons, and data analysis write-ups.

📝 Technical articles

Engineering specs, mix ratios, and proportional scaling docs.

🧮 Education

Interactive math tutorials and entity reference pages.

💡 Best Practices

Do

  • Use &ratio; for readable source markup
  • Pick one style (hex / decimal / named) per project
  • Use ∶ for formal mathematical ratio notation
  • Test the glyph across browsers and devices
  • Pair ∶ with plain text on first use in educational content

Don’t

  • Substitute an ASCII colon (:) when ∶ is required
  • Confuse ∶ (ratio) with ∷ (proportion) or ∝ (proportional to)
  • Use CSS escape \2236 inside HTML text nodes
  • Use padded Unicode notation like U+02236—the correct value is U+2236
  • Mix entity styles randomly in one file

Key Takeaways

1

Three HTML references plus CSS all render ∶

&#x2236; &#8758; &ratio;
2

For CSS stylesheets, use the escape in the content property

\2236
3

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

4

Prefer &ratio; for readability—distinct from colon and proportion symbols

❓ Frequently Asked Questions

Use &#x2236; (hex), &#8758; (decimal), &ratio; (named), or \2236 in CSS content. All produce ∶.
U+2236 (hex 2236, decimal 8758). It denotes a ratio in the Mathematical Operators block.
∶ (U+2236, &ratio;) is the ratio operator. ∷ (U+2237, &Colon;) is the proportion operator. : (U+003A) is an ordinary ASCII colon—not the same character.
In mathematical notation, geometry, fraction and ratio expressions, academic papers, textbooks, statistics, and any content expressing ratios between quantities.
Yes. &ratio;, &#8758;, and &#x2236; are equivalent in modern browsers and all render ∶.

Explore More HTML Entities!

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